- Synchronous Reference Frame (SRF) Transformation
How to extract 50Hz fundamental frequency components or DC components with less delay in Simulink?
조회 수: 31 (최근 30일)
이전 댓글 표시
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
채택된 답변
Ayush
2024년 8월 14일
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
추가 답변 (0개)
커뮤니티
더 많은 답변 보기: Power Electronics Community
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!