Matlab/Simulink questions - Page 1
Forum section: electronics / general

author: nForce
author_rank: Frequent Contributor
timestamp: October 02, 2018, 03:59:06 pm
content: Hi,I would like to know if someone on this forum understands simulink and know how to build and simulate different systems? Let's say wind turbine or synhronous motor or power plant for example.I had watched all the tutorials from Matlab for simulink on youtube, but there are just few of them and covers only the basics.Thanks.

author: ataradov
author_rank: Super Contributor
timestamp: October 02, 2018, 04:46:58 pm
content: There is not a tutorial on how to represent a real-life system as a set of basic control systems building blocks. You have to be an expert in the area or experiment a lot, no other way around it. Or find a model that others have designed and transcribe it to Simulink.Simulink will help you with the simulation, but what to simulate is up to you.

author: helius
author_rank: Super Contributor
timestamp: October 02, 2018, 05:00:32 pm
content: For simulations you can also look at Mathematica System Modeler andModelica.

author: rstofer
author_rank: Super Contributor
timestamp: October 02, 2018, 05:51:51 pm
content: A quick Google turned up this page:https://www.mathworks.com/discovery/power-system-simulation-and-optimization.htmlThere is a group, MathWorks Consulting, that might be able to help for a fee.My use of Simulink is limited to using the building blocks to model an analog computer. Not very useful in this context.

author: nForce
author_rank: Frequent Contributor
timestamp: October 03, 2018, 12:59:23 pm
content: Quote from: ataradov on October 02, 2018, 04:46:58 pmIf I correctly understand simulink then If I have some equations which describe a system I just add them as blocks and connect them. Then I can simulate this system?

author: rstofer
author_rank: Super Contributor
timestamp: October 03, 2018, 02:40:31 pm
content: At its simplest level, yes, but it's much bigger than that. I can add knobs and dials for variables and somehow I can actually interface to the real world.In the attached .pdf, I have created a block diagram of the classic Mass-Spring-Damper second order ordinary differential equation. I have also included a screen shot.I have other examples that are a good deal more complex because the variables are controlled by knobs. The cross-coupled differential equations for the Predator-Prey problem is one example. This particular problem is continuous in time whereas the MSD dies out after some number of cycles assuming there is a damping factor.https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equationsAll of my projects make just a trivial use of Simulink. I am far from an experienced user. It is certainly possible to include transfer functions for the controller, plant and feedback. I haven't done it but if I were taking a Controls course, MATLAB would be my best friend. Maybe that's why there is actually a semester long course on how to use it in the Engineering curriculum at our community college (lower division).Lord Kelvin came up with the approach used in analog computing to solve these equations. Pretend you have the highest order derivative in your hand. Run it through a series of integrators to form lower order derivatives until you come up with the variable itself. Use all of these derivatives and the variable itself to form the right hand side of the equation using whatever is required in terms of adders, inverters, multipliers, etc. Now that you have the right hand side, you look at the equation and realize you just formed the highest level derivative that's on the left hand side of the equal sign. So, connect a jumper in place of the equal sign and you're ready to go. There may be initial conditions to deal with.In my MSD example, the second integrator has an initial condition of -1 which is equivalent to pulling the spring to some length before releasing it.