Using Simscape Electrical, it is easy to model any electrical drive
In this case we have an induction motor example
but the same idea applies to other model types such as permanent magnet synchronous motor
So in this particular demo, we start by adding the a synchronous machine squirrel-cage block and the convertor block those two are the main two blocks on the machine side
On the grid side, we need a three phase voltage source
We need the transformer which in this case is a YY transformer
and we need a converter that will operate as a rectifier to provide the DC link voltage
In the diagram, light blue means composite three-phase connections while dark blue like here means single-phase electric connection
There is an option to select composite or expanded three-phase ports for any three-phase block insensitive Electrical library by doing something like this
So right click and then we can select expanded three-phase port
Also it is quite easy to change the parameters for any block
We can add new features like add magnetic saturation for the induction motor
We can have single squirrel cage or double square cage
We can change the switching devices in the convertor block
and we can change the parameter flow of the transformer, depending on our application and depending on the requirements that we have for our system
Then we have the gate driver which is implemented using the six poles gate multiplexer
and this is the interface between Similink controller and Simscape plant
As in any physical system
we need also some sensors to measure the relevant signals such as currents and voltages
so we have a bunch of sensors here measuring the phase currents and voltages and during the the DC link voltage
and also we need to model the the mechanical part and the mechanical load
So here we have a simple model with a machine inertia block and the torque source which will allow us to to adjust the load torque in the system
Not least important in each physical network we need to have one solver configuration block
and in this solver congregation block, we define the solver parameters which are used in the simulation
We can use a local solver in order to speed up the simulation and to prepare our model for hardened loop simulation
and in the local solver, we can choose record boiler
This will give us accurate results but sometimes is not as fast as we want
So as a trade-off, we shall consider the partitioning solver which is faster but can be used in any model
and it is also quite easy to add new blocks in the model
For example, if I want to add here a permanent magnet synchronous motor block
I can just type the name and add the ad this broken into the model
Now that we have a plant model
We have to design the controller
This is done in Simulink using field oriented control based on PI controllers which are still the main choice in industrial applications because every engineer knows how a PI controller works
We can use blocks from Simulink library and blocks from control sub library that we have in Simscape Electrical
Those control blocks from Simscape Electrical are designed for electrical systems in order to simplify the control design process for electrical systems
For example, in this case we have the inverse SPARC transform
and the PWM generation using custom blocks from control sub library of Simscape Electrical
For the control algorithm, we have two PI controllers in the inner loop
One PI controller for the D axis current
and one PI I control for the Q axis current
the D axis current reference which is the flux component is obtained from a PI controller that regulates the magnetizing current
the Q axis current reference which is the torque component is obtained from a velocity controller
and remember that this is a senseless architecture
so we must estimate the velocity and rotor angle along with the magnetizing current
and this is done by employing a motor reference adaptive control based flux observer
where the reference model is implemented using the stator equations to compute the dnq components of the flux
Then we have the adaptive model implemented based on the rotor equations
and we have a PI controller that is used for that adaptation law
The grid side converter control is not covered in this presentation that is quite similar to the machine side converter controller
Now that we have modelled the system
Next step is to start tuning the controller