In this presentation we are going to see the challenge associated with implementation of power electronics controls on embedded processor
So the hardware which we are using today is a DC to DC led kit from texas instrument
and the control card is c 2 8 0 3 5
the challenge is to reduce the development time in implementation of the algorithm on the Himba dead hardware
and the solution is to verify the controller for various test cases using simulation
and then generate code from MATLAB and Simulink models optimized for the embedded controller
Let's see how this challenge is addressed in detail
This is the DC to DC Sepik converter with voltage mode control
and we have done our exercise already in tuning the p i-- gains of the controller
Now I can do various scenarios and see how the controller is performing
For example, I can give a cyclic load over here and see how my voltage response looks like
Similarly you can do various other tests and see how the controller is performing
once you have verified the performance of the controller
The next step is implementation of the controller onto an embedded processor
If you have embedded coder license, you can download the hardware support package
Which is very specific to C 2000 processor
Once you have downloaded and installed Target Support Package
you'll get a library browser blocks which looks like this
and here you can see that you've got the driver layer for all these different c2000 processor
and also certain optimized blocks available for specific processor for math operation and things like that
Certain algorithms like Park transform, clock transform
the PID controller in itself is available as a block
So essentially I can replace my algorithm which was in terms of gains
By the optimized blocks over here, which I have taken from Target Support Package
and I can use this ADC block
and PWM block, which I have taken from Target Support Package library
So essentially I've got both the driver layer and the application layer in one single model
Now I can go ahead and generate code and see how the code generation looks like
So for this before deploying it into the hardware
I just want to generate code only and show you how it looks like
so at this moment I'll just generate code only
so the moment I have got the model ready I can click on this build button
and this will generate C code in a specific folder
You will also see that in awhile. You will get a HTML report
Which looks like this so you can observe that I can move from my code
to my model and vice versa
and by doing this you can essentially understand how your model is generated as a code over here
I'll go ahead and remove the code generation only setting
Then choose the code composer studio tool chain
So what it means is now when I am connecting the hardware and generating code it will not only generate code for my driver layer and application layer
but it will also invoke code composer studio and deploy the executable on to the actual processor
Additionally if I have external mode I can tune certain parameters from my model
Let's now generate code and deploy onto the processor
This is how the final implementation looks like
I've used simulation to accurately tune the PA gains
and I am now running the model in external mode
Which means I'm generating the code
deploying the same onto the micro processor
and also have access to certain parameters which I can tune from the model in real-time
In this case I can change the reference voltage
and increase the brightness of the LED strip and see how my controller is performing
I can increase the brightness or decrease the brightness of these individual LED strips
and see how my controller is performing
So to summarize the presentation
we saw how you can address the challenge reducing the development time by generating C code from the models onto a TA control