- Computers & Software
Why engineers need MATLAB
MATLAB is a software that can be used for many applications across a wide range of fields, including science and engineering. The most important part of any business is not spend money if they don't have to, the use of MATLAB shortens the overall time spent completing a project.
- signal processing.
- image and video processing.
- control systems.
- computational finance.
- computational biology.
Reasons for using a GUI:
- Simpler than the MATLAB command window.
- Allows for more interaction with the system.
- Changes to the system can be made easier.
- Extremely useful for damping and feedback design.
The example below shows a GUI for the passenger seat suspension on an aircraft. It includes many variable parameters about the aircraft, so that the GUI can be used for many different types of aircraft and under different operating conditions.
System modelling is a major part of system design. By writing a model in terms of a transfer function, an engineer that simulate approximate results of the system. As an example I have design a system which is shown by the equation to the right. The system requirements were for a settling time of less than 3 seconds and a phase margin of 50 degrees. Although the design was based on these specifications the results were not satisfactory. From the diagrams below it can be seen that the phase margin is 90 degrees and so are far off the specifications. Without MATLAB (or some other system modelling software) a prototype would have needed to be made. Thanks to MATLAB we can tweak the design until the specifications have been met. Although this doesn't mean that once we actually make the system it will perform exactly as the model, the model is still an approximation.
As the initial system wasn't correct we were able to implement a compensator to improve the design. The graphs below show that now both requirements have been met and a prototype can start to be built.
Simulink provides a block diagram environment used for model based design. The block diagram environment is a lot easier to understand and design models and so it is used for much more complicated systems.
- Build Model.
- Simulate Model.
- Analyse Results.
- Connect to Hardware.
Many different models mostly of dynamic systems, a few of the models that can be created are:
- DC motor.
- Fluid levels.
- Robotic arm.
- Mass spring damper.
- State space modelling.
Simulating a DC motor:
After deriving equations for the speed and current of the motor, they can be transferred onto a model in Simulink. The only other way to do this would have been using an actual motor and recording the results.
The model on the right assumes zero initial conditions and the values for resistance and other values were just taken from a data book.
Learning MATLAB and Simulink
The best way to learn these software are to do YouTube tutorials. MATLAB is essentially a programming software but with many different languages, the more you practice with it the better you will get. You must be careful to actually learn how to simulate a model yourself by deriving equations from first principles. For current undergraduates that have been looking for summer placements or year long placements, they will have undoubtedly asked for knowledge of MATLAB and maybe C-programming or another programming language. The fact that these are requirements for most of the jobs shows how important the software is.