mirror of https://github.com/g4klx/MMDVM.git
Change emphasis time constant to 750µS
This commit is contained in:
parent
b2f33fd4d2
commit
69e39e36b0
4
FM.cpp
4
FM.cpp
|
@ -39,8 +39,8 @@ m_hangTimer(),
|
||||||
m_filterStage1( 724, 1448, 724, 32768, -37895, 21352),//3rd order Cheby Filter 300 to 2700Hz, 0.2dB passband ripple, sampling rate 24kHz
|
m_filterStage1( 724, 1448, 724, 32768, -37895, 21352),//3rd order Cheby Filter 300 to 2700Hz, 0.2dB passband ripple, sampling rate 24kHz
|
||||||
m_filterStage2(32768, 0,-32768, 32768, -50339, 19052),
|
m_filterStage2(32768, 0,-32768, 32768, -50339, 19052),
|
||||||
m_filterStage3(32768, -65536, 32768, 32768, -64075, 31460),
|
m_filterStage3(32768, -65536, 32768, 32768, -64075, 31460),
|
||||||
m_preemphasis(32768, 13967, 0, 32768, -18801, 0),//75µS 24kHz sampling rate
|
m_preemphasis(32768, 1771, 0, 32768, -30997, 0),//750µS 24kHz sampling rate
|
||||||
m_deemphasis (32768, -18801, 0, 32768, 13967, 0),//75µS 24kHz sampling rate
|
m_deemphasis (32768, -30997, 0, 32768, 1771, 0),//750µS 24kHz sampling rate
|
||||||
m_blanking(),
|
m_blanking(),
|
||||||
m_useCOS(true),
|
m_useCOS(true),
|
||||||
m_rfAudioBoost(1U),
|
m_rfAudioBoost(1U),
|
||||||
|
|
|
@ -9,21 +9,24 @@ clear all;
|
||||||
clc;
|
clc;
|
||||||
|
|
||||||
fs = 24000;
|
fs = 24000;
|
||||||
|
timeConstant = 0.00075; %750µS
|
||||||
|
|
||||||
|
|
||||||
samplingtime = 1/fs;
|
samplingtime = 1/fs;
|
||||||
|
|
||||||
% analog prototype
|
% analog prototype
|
||||||
A2 = [1];
|
A2 = [1];
|
||||||
B2 = [0.000075 1];
|
B2 = [timeConstant 1];
|
||||||
|
|
||||||
% Pre
|
% Pre
|
||||||
Ds = tf(B2, A2);
|
%Ds = tf(B2, A2);
|
||||||
% De
|
% De
|
||||||
% Ds = tf(A2, B2);
|
Ds = tf(A2, B2);
|
||||||
|
|
||||||
Ds = Ds/dcgain(Ds);
|
Ds = Ds/dcgain(Ds);
|
||||||
|
|
||||||
% MZT
|
% MZT
|
||||||
T1 = 0.000075; % 75us
|
T1 = timeConstant;
|
||||||
z1 = -exp(-1.0/(fs*T1));
|
z1 = -exp(-1.0/(fs*T1));
|
||||||
p1 = 1+z1;
|
p1 = 1+z1;
|
||||||
|
|
||||||
|
@ -37,12 +40,12 @@ b2 = 0;
|
||||||
|
|
||||||
% swap between a1, b1 to select pre- or de-emphasis
|
% swap between a1, b1 to select pre- or de-emphasis
|
||||||
|
|
||||||
# Pre
|
% Pre
|
||||||
Bmzt = [b0 a1 b2]
|
%Bmzt = [b0 a1 b2]
|
||||||
Amzt = [a0 b1 a2]
|
%Amzt = [a0 b1 a2]
|
||||||
% De
|
% De
|
||||||
% Bmzt = [b0 b1 b2]
|
Bmzt = [b0 b1 b2]
|
||||||
% Amzt = [a0 a1 a2]
|
Amzt = [a0 a1 a2]
|
||||||
|
|
||||||
DzMZT = tf(Amzt, Bmzt, samplingtime);
|
DzMZT = tf(Amzt, Bmzt, samplingtime);
|
||||||
DzMZT = DzMZT/dcgain(DzMZT);
|
DzMZT = DzMZT/dcgain(DzMZT);
|
||||||
|
|
Loading…
Reference in New Issue