I’m trying to use the ready-made Vector Control Induction Machine model from Texas Instruments, but I’ve adapted it to run on an STM32 (F303RE model), and I’m getting several errors, such as undefined variables. Below is an example of one of the errors I’m encountering.
Error in component encoder_final/PI/Lσ while evaluating parameter Gain: ‘Lsigma’ undefined.
The Vector Control of an Induction Machine demo model defines model parameters using the model initialization commands. These can be accessed under Simulation→Simulation parameters…→Initialization. Whenever you copy the controller model to a new PLECS file, it is necessary to also copy the script from the model initialization commands to ensure that all variables used in your model have a definition in the new file.