@@ -27,8 +27,19 @@ This folder contains the files used in developing the model of the quadcopter.
**Comparing Simulated and Real Motor PWM Signals**
With the addtion of the Zybo PCB shield, MicroCART users can now compare motor PWM signals measured from test points on the PCB shield with simulated motor PWM signals created by the Simulink simulator. This is useful for verifying that a controller is behaving as expected without needing to risk damaging the quad during test flights.
With the addtion of the Zybo PCB shield, MicroCART users can now compare motor PWM signals measured from test points on the PCB shield with simulated motor PWM signals created by the Simulink simulator. This is useful for verifying that a controller is behaving as expected without needing to risk damaging the quad during test flights. The physical test points are located on the JE2 header block on the PCB. The simulated signals are contained in the “motorCommands.signals.values” variable. This variable is created in MATLAB's workspace after running a simulation and is updated after each simulation is completed.
To measure the physical motor PWM signals:
1. Connect an oscilliscope probe to a motor PWM header pin and a ground pin.
2. Calculate the duty cycle of the signal by measuring the time the PWM signal is high and divide it by the period of the PWM signal (~2.2ms).
* The PWM signal should have a duty cycle of ~50% when the quad is on but there is no input sent to the motors.
To measure the simulated motor PWM signals:
1. Open and run the simulator as instructed in the sections above.
2. Locate the "motorCommands" variable in the MATLAB workspace.
3. Open "signals" then open "values" to observe the duty cycle values of each motor PWM signal.
* These signals roughly match the output of the physical system but the user should run tests to observe how accurately the simulation matches the physical results since motors and other components may be switched.