- Synchronous Reference Frame (SRF) Transformation
How to extract 50Hz fundamental frequency components or DC components with less delay in Simulink?
31 views (last 30 days)
Show older comments
I want to extract the 50Hz fundamental frequency component or DC component of the voltage at the shunt point in a double closed loop control of an inverter. As far as I know, a low pass filter or a notch filter can be used. But the lower the cutoff frequency, the greater the signal delay between input and output. Is there a good way to solve the delay problem?
0 Comments
Accepted Answer
Ayush
on 14 Aug 2024
Hi Xin,
I understand that you want to extract a particular fundamental frequency component of voltage at the shunt point in a double closed loop control of an inverter.
Here are some of the filtering techniques which I use. Also, I have listed the tradeoffs for each of the filtering method.
The SRF transformation, also known as the “Park” transformation, can be used to transform the AC signal into the d-q reference frame. This method effectively isolates the fundamental frequency component (50Hz) and the DC component.
Here’s pseudo code for the same:
% Assuming v is the input voltage signal and fs is the sampling frequency
theta = 2 * pi * 50 * (0:length(v)-1) / fs; % 50Hz fundamental frequency
cosTheta = cos(theta);
sinTheta = sin(theta);
v_d = v .* cosTheta; % d-component
v_q = v .* sinTheta; % q-component
% Low-pass filter the d and q components to extract the DC part
[b, a] = butter(2, 2*50/fs); % Low-pass filter with cutoff at 50Hz
v_d_filtered = filter(b, a, v_d);
v_q_filtered = filter(b, a, v_q);
% Transform back to the original reference frame
v_50Hz = v_d_filtered .* cosTheta + v_q_filtered .* sinTheta;
2. Adaptive Notch Filter
An adaptive notch filter can be used to dynamically track and filter out the 50Hz component with minimal delay. MATLAB's “dsp.NotchPeakFilter” system object can be used for this purpose.
Fs = 1000; % Sampling frequency
F0 = 50; % Frequency to be removed (50Hz)
BW = 2; % Bandwidth of the notch
% Create the notch filter
notchFilter = dsp.NotchPeakFilter('CenterFrequency', F0, 'Bandwidth', BW, 'SampleRate', Fs);
% Apply the filter
v_filtered = notchFilter(v);
3. Phase-Locked Loop (PLL)
A PLL can be used to lock onto the 50Hz component and extract it with minimal delay. The PLL dynamically adjusts to track the phase and frequency of the input signal.
% Create a PLL System object
pll = comm.PhaseFrequencyOffset('FrequencyOffset', 50, 'SampleRate', fs);
% Apply the PLL
v_pll = pll(v)
There’s also “Kalman” Filter. You can read about these filters more in the following documentations:
Butterworth filter: https://in.mathworks.com/help/signal/ref/butter.html
Notch Peak filter: https://in.mathworks.com/help/dsp/ref/notchpeakfilter.html
Phase-Locked Loop : https://in.mathworks.com/help/releases/R2024a/comm/ref/comm.phasefrequencyoffset-system-object.html
Kalman Filter: https://in.mathworks.com/help/control/ref/kalmanfilter.html
Hope it helps!
0 Comments
More Answers (0)
Communities
More Answers in the Power Electronics Control
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!