Oscilloscope
Oscilloscope
dev_motor_controller features on board oscilloscope functionality that is useful for inspecting the internal state at rates up to the main controller frequency. An example use of the oscilloscope is inspecting a step response of a current controller.
Oscilloscope features are:
- Configurable sample rate
- Four source configurable channels, each with a depth of 1792 float32 values.
- Rising edge (currently) trigger with configurable source
Oscilloscope Commands
Command | Type | Required | Description |
---|---|---|---|
oscilloscope_sample_rate_hz |
uint32 | Required | Set the sampling frequency of the oscilloscope. The oscilloscope frequency must be an even divisor of the current controller frequency. |
oscilloscope_trigger_source |
enum | Required | Sets the trigger source signal. See Oscilloscope Sources for a list of trigger sources. |
oscilloscope_trigger_level |
float32 | Required | Sets the level for the trigger. Once the trigger source passes this value the oscilloscope will sample until the channel arrays are full. |
oscilloscope_channel_0_source |
enum | Optional | Sets the channel 0 source signal. See Oscilloscope Sources for a list of sources. |
oscilloscope_channel_0 |
float32 | Optional | Contains the channel 0 sampled data. Total length is 1792 float32 values. All values must be read out. |
oscilloscope_channel_1_source |
enum | Optional | Sets the channel 1 source signal. See Oscilloscope Sources for a list of sources. |
oscilloscope_channel_1 |
float32 | Optional | Contains the channel 1 sampled data. Total length is 1792 float32 values. All values must be read out. |
oscilloscope_channel_2_source |
enum | Optional | Sets the channel 2 source signal. See Oscilloscope Sources for a list of sources. |
oscilloscope_channel_2 |
float32 | Optional | Contains the channel 2 sampled data. Total length is 1792 float32 values. All values must be read out. |
oscilloscope_channel_3_source |
enum | Optional | Sets the channel 3 source signal. See Oscilloscope Sources for a list of sources. |
oscilloscope_channel_3 |
float32 | Optional | Contains the channel 3 sampled data. Total length is 1792 float32 values. All values must be read out. |
oscilloscope_force_start |
command | Optional | The oscilloscope will immediately start sampling at the completion of this command, regardless of trigger configuration. |
oscilloscope_wait_trigger |
command | Optional | The oscilloscope will start sampling once the trigger conditions are met. |
oscilloscope_is_done |
bool | Optional | Returns true if the oscilloscope is finished sampling, false if the oscilloscope has not finished sampling, or in an unconfigured state. |
Oscilloscope Sources
Oscilloscope Source | Description |
---|---|
mc_osc_sense_i_a |
Measured phase current (A). Phase A. |
mc_osc_sense_i_b |
Measured phase current (A). Phase B. |
mc_osc_sense_i_c |
Measured phase current (A). Phase C. |
mc_osc_foc_i_al |
Measured motor current (A). Al axis in AlBe frame. |
mc_osc_foc_i_be |
Measured motor current (A). Be axis in AlBe frame. |
mc_osc_foc_i_d |
Measured motor current (A). D axis in DQ frame. |
mc_osc_foc_i_q |
Measured motor current (A). Q axis in DQ frame. |
mc_osc_foc_i_d_cmd |
Current command (A). D axis in DQ frame. |
mc_osc_foc_i_q_cmd |
Current command (A). Q axis in DQ frame. |
mc_osc_foc_i_d_cmd_ff |
Current command (A) with any feedforward terms present. D axis in DQ frame. |
mc_osc_foc_i_q_cmd_ff |
Current command (A) with any feedforward terms present. Q axis in DQ frame. |
mc_osc_foc_v_d_cmd |
Voltage command (V) as output from current controller. D axis in DQ frame. |
mc_osc_foc_v_q_cmd |
Voltage command (V) as output from current controller. Q axis in DQ frame. |
mc_osc_foc_v_d_mod_cmd |
Modulated voltage command (normalised to DC bus voltage). D axis in DQ frame. |
mc_osc_foc_v_q_mod_cmd |
Modulated voltage command (normalised to DC bus voltage). Q axis in DQ frame. |
mc_osc_foc_v_al_mod_cmd |
Modulated voltage command (normalised to DC bus voltage). Al axis in AlBe frame. |
mc_osc_foc_v_be_mod_cmd |
Modulated voltage command (normalised to DC bus voltage). Be axis in AlBe frame. |
mc_osc_foc_duty_a_cmd |
Duty cycles as output to PWM unit. Phase A. |
mc_osc_foc_duty_b_cmd |
Duty cycles as output to PWM unit. Phase B. |
mc_osc_foc_duty_c_cmd |
Duty cycles as output to PWM unit. Phase C. |
mc_osc_sense_v_a |
Measured phase voltage (V). Phase A. |
mc_osc_sense_v_b |
Measured phase voltage (V). Phase B. |
mc_osc_sense_v_c |
Measured phase voltage (V). Phase C. |
mc_osc_foc_v_al |
Measured motor voltage (V). Al axis in AlBe frame. |
mc_osc_foc_v_be |
Measured motor voltage (V). Be axis in AlBe frame. |
mc_osc_foc_v_d |
Measured motor voltage (V). D axis in DQ frame. |
mc_osc_foc_v_q |
Measured motor voltage (V). Q axis in DQ frame. |
mc_osc_rotor_th_m |
Rotor mechanical position (Rad). |
mc_osc_rotor_th_e |
Rotor electrical position (Rad). |
mc_osc_rotor_th_internal_m |
Rotor mechanical position (Rad). Direct from encoder, no compensation applied. |
mc_osc_rotor_w_m |
Rotor mechanical speed (Rad/S). |
mc_osc_sense_vdc |
Measured DC bus voltage (V). |
mc_osc_i_mot |
Computed motor current (A). |
mc_osc_i_bus |
Computed bus current (A). |