2 Steps for Bode Plot Measurement
By following these steps, one can measure the frequency response of the plant and generate a Bode plot using the dsPIC Digital Power Plug-In Module.
- Soldering Resistor: Solder a 150Ω resistor at R94 in the DP PIM. This resistor connects the BODE-injected signal with an offset to an ADC input of the dsPIC.
- Open-Loop Mode: Run the power stage in Open-Loop mode with a fixed duty cycle or fixed period, depending on the power converter control. Running in Open-Loop mode allows for the analysis of the plant’s response without the influence of feedback control.
- Initialize ADC Module: The ADC
peripheral needs to be initialized to sample the BODE injection signal.
Figure 2-1. ADC MCC Melody Customization for dsPIC33CK - Sampling Signal: Sample the injected disturbance at every PWM cycle at switching frequency (FSW) or at the control loop update rate. Sampling the signal at this rate ensures that the measurements are synchronized with the system’s operation, providing accurate data for the Bode plot.
- Initialize DAC Module: The
CMP/DAC peripheral needs to be initialized with the DAC output enabled.
Figure 2-2. DAC MCC Melody Configuration - Connecting RA3_DAC1_OUT:
Connect RA3_DAC1_OUT to the DP PIM TP3 pin for the BODE 100 CH1 connection.
Figure 2-3. DAC Output Configuration - Removing Offset: Remove the VDD/2 offset in the firmware to regain a signal with no DC value.
- Adding Sampled Signal: Add the sampled AC signal to the nominal duty cycle or the nominal frequency. This step modulates the duty cycle/frequency with the injected AC signal, allowing the system’s response to be measured.
- Perform BODE Measurement: Run the BODE measurement to obtain the gain and phase of the plant measurement.
Below is an example of the code required to perform plant measurement in a fixed-frequency application:
