The objective of this activity was to design and control a DC motor using Simulink. This task built on previous work done in MATLAB, where the DC motor was characterized. The data from that characterization, such as motor speed and voltage, were essential in creating an accurate control system for the motor in Simulink. This allowed us to understand how to control the motor's speed and behaviour.
Sine Wave Block:
The first block is the sine wave block which simulates changes in motor speed commands over time by generating a time-varying signal that drives the motor to speed and slow down.
Within this block, the amplitude can also be changed, determining the signal's strength.
Look-Up Table Block:
The next block converts the motor speed command into a corresponding voltage/PWM signal that the motor can process. It ensures that the correct voltage is applied for the desired motor speed.
The values within the table are taken from the values in the Matlab motor characterization activity (see image on the right)
Gain Block:
The gain block amplifies the signal before it is sent to the motor driver to ensure it receives a strong enough signal to control the motor effectively. The current gain value is set to 100 and is decided based on its corresponding Matlab code that determined it was an appropriate signal strength for the motor.
Scope Block:
The scope block monitors the system's performance. It also shows the real-time motor speed response, and this visualization allows for easy troubleshooting and ensures the motor behaves as expected.
Device Driver Block:
The final block is at the end of the diagram and sends control signals from the Simulink "motor" to the actual DC motor through the arduino.
The graph on the right illustrates the relationship between the motor's input and its output speed response, showing an overall smooth curve. This matches closely with the sine wave input from the block diagram, showing that it followed the command signal accurately. The motor speed changes similarly to our MATLAB tests, ensuring correct data was transferred from MATLAB. It consistently adjusts with the input, proving the system is effective at responding to the input signal. Overall, the graph matches closely with the expected results and follows the set parameters in the Simulink block diagram.