# Designing a Butterworth Filter

조회 수: 15 (최근 30일)
Oliver-Maximilian Klein 2022년 3월 18일
댓글: Oliver-Maximilian Klein 2022년 3월 20일
Hey there guys and gals,
i want to design a Butterworth filter for a field oriented control of a permanent magnet synchronous machine. Where a sensor in the rotor tracks the mechanical angle of the rotor. This signal is then differentiated. Because of the differentiation the high frequencies of the noise are amplified, so i need to filter it. Ive decided to model a 2nd order Filter. The motor is supposed to accelerate to n = 16000 rpm which is roughly an angular velocity omega of 1675 rad/min. So my cut off frequency is calculated based on fc = 1 / ( 2 *pi * omega (1675 / 60) ) ? And the pass frequency is everything below fc ?
If you need any clarifications, please let me know.

댓글을 달려면 로그인하십시오.

### 답변 (1개)

Scott MacKenzie 2022년 3월 19일
편집: Scott MacKenzie 2022년 3월 19일
Here's a solution, but it requires MATLAB's Signal Processing Toolbox.
Given, sRate, the sample rate of your data, fc, the desired cuttoff frequency, and y1, your input signal, then...
% create 2nd-order low-pass butterworth filter
[b, a] = butter(2, fc/(sRate/2), 'low');
% filter the input signal (y1)
y2 = filter(b, a, y1);
##### 댓글 수: 3이전 댓글 1개 표시이전 댓글 1개 숨기기
Scott MacKenzie 2022년 3월 20일
편집: Scott MacKenzie 2022년 3월 20일
@Oliver-Maximilian Klein, you're welcome. BTW, what is the same rate of your data? And is your cutoff frequency simply the frequency of rotation of the motor, i.e., 16000/60 = 266.7 Hz?
Oliver-Maximilian Klein 2022년 3월 20일
my simulation runs in the continous time domain, so there is no rate of data. The cut off frequency should be 226.7 Hz. The angular acceleration is the torque divided by the inertia, and ive basically used that equation to compute a time constant for a first oder lag element low pass filter.

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Butterworth에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by