Matlab
1.
1.1
1.2
1.3
1.4 Matlab
2.
2.1
2.2
1
1
1
1
2
3
4
2.3
//
AMI HDB3 PST
(1)
(2)
1
10
2
2
10
3
3
Return-to-zeroRZτ
T
τ/ T 50%
4
4
5
2
2.4
1
= ∑
( )
s t
( )
t
s
+¥
n
=-
n
1
( )
t
s
n
(
g t
1
(
g t
2
=
)
)
s
nT ,P
1
nT , -P
s
2
( )
1g t ( )
2g t 01 sT
2
f PG mf
B
1
(
)
+
B
(
1
)
P G mf
(
2
2
)
B
(
)
f mf
B
3
2
(
P f
s
)
=
(
1
f P
s
(
)
P G f
1
)
(
G f
2
2
)
+
∑
+¥
=-
m
3
¥
-
-
¥
-
-
-
x
-
6
7
6 7
<1>
<2> N
0
=
k
0
k< <
1
=
P
1
1
( )
g t
1
( )
g t
2
2.5
-
T
8
8
9
9
9 10
10
10
<1>
<2>
<3>
<4>
<5>
3.
3.1
3.1.1
Matlab
3.2
Step1. Matlab.m
Step2.
Step3.
Step4.
Step5.
Step6.
randint length input=randint(1length)
for i=1:length(bit)%%length(m)m
if bit(i)==0
bits=zeros(1,N);
else
bits=ones(1,N);
end
sig=[sig,bits];
end
y = awgn(x,SNR) x SNR dB
x 0dBW x
y = awgn(x,SNR,SIGPOWER) SIGPOWER dBW
SIGPOWER 'measured'
y = awgn(…,POWERTYPE) SNR SIGPOWER POWERTYPE
'dB''linear' POWERTYPE 'dB' SNR dB
SIGPOWER dBW POWERTYPE 'linear' SNR
SIGPOWER
MATLAB IIR Butterworth
Cheby1 I Cheby2
II ellipord
Wp=a/(fs/2); a a [a1
Rp=c; %% c
Rs=d; %% d
[b,a]=ellip(n,Rp,Rs, Wp);
sf0=filter(b,a,signal)
cxn=xcorr(bitg,'unbiased'); %%
nfft=1024;
CXk=fft(cxn,nfft);
Pxx=abs(CXk);
index=0:round(nfft/2-1);
k=index*fs/nfft;
plot_Pxx=10*log10(Pxx(index+1));
a2]
plot(k,plot_Pxx);
4. Matlab
硬 信 硬 硬 硬 硬
3
2
1
0
0
200
400
600
800
1000
1200
1400
1600
1800
2000
硬 信 硬 硬 硬 硬 硬 硬
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
40
30
20
10
0
0