线性调频信号(Chirp信号)公式

Chirp信号的公式

对于固定频率 f 1 f_1 f1的信号,表达式为:
r ( t ) = c o s ( 2 π ⋅ f 1 ⋅ t ) (1) r(t) = cos(2\pi \cdot f_1 \cdot t) \tag{1} r(t)=cos(2πf1t)(1)
其中余弦信号的相位是频率对时间的积分:
θ ( t ) = 2 π ∫ 0 t f 1 ⋅ τ d τ = 2 π f 1 t (2) \theta (t) = 2\pi \int_0^t f_1 \cdot \tau d \tau=2\pi f_1t \tag{2} θ(t)=2π0tf1τdτ=2πf1t(2)
Chirp信号的频率是随时间变化的,最简单的一种变化就是线性变化,从 t = t 0 t=t_0 t=t0时刻的频率 f s t a r t f_{start} fstart开始,变化到 t = t 1 t=t_1 t=t1时刻的频率 f e n d f_{end} fend,那么任意时刻的信号频率可以表示为:
f ( t ) = f e n d − f s t a r t t 1 − t 0 × t + f s t a r t (3) f(t) = \frac{f_{end}-f_{start}}{t_1-t_0} \times t + f_{start}\tag{3} f(t)=t1t0fendfstart×t+fstart(3)
对应得余弦信号的相位变为:
θ ( t ) = 2 π ∫ t 0 t f ( τ ) d τ = 2 π ∫ t 0 t f e n d − f s t a r t t 1 − t 0 × τ + f s t a r t d τ = 2 π [ f e n d − f s t a r t t 1 − t 0 ⋅ 1 2 ( t − t 0 ) 2 + f s t a r t ( t − t 0 ) ] (4) \theta (t) = 2\pi \int_{t_0}^{t} f(\tau) d\tau=2\pi \int_{t_0}^{t} \frac{f_{end}-f_{start}}{t_1-t_0} \times \tau + f_{start} d\tau \\ =2\pi [\frac {f_{end}-f_{start}}{t_1-t_0}\cdot \frac {1}{2}(t-t_0)^2+f_{start}(t-t_0)]\tag{4} θ(t)=2πt0tf(τ)dτ=2πt0tt1t0fendfstart×τ+fstartdτ=2π[t1t0fendfstart21(tt0)2+fstart(tt0)](4)
t 0 = 0 t_0=0 t0=0,则上式可以化简为:
θ ( t ) = 2 π [ f e n d − f s t a r t t 1 − t 0 ⋅ 1 2 t 2 + f s t a r t ⋅ t ] (5) \theta (t) =2\pi [\frac {f_{end}-f_{start}}{t_1-t_0}\cdot \frac {1}{2}t^2+f_{start}\cdot t]\tag{5} θ(t)=2π[t1t0fendfstart21t2+fstartt](5)
对应的Chirp信号可以表示为:
r ( t ) = c o s [ 2 π ( f e n d − f s t a r t t 1 − t 0 ⋅ 1 2 t 2 + f s t a r t ⋅ t ) ] (6) r(t) = cos[2\pi (\frac {f_{end}-f_{start}}{t_1-t_0}\cdot \frac {1}{2}t^2+f_{start}\cdot t)] \tag{6} r(t)=cos[2π(t1t0fendfstart21t2+fstartt)](6)
令起始时间 t 0 = 0 t_0=0 t0=0,结束时间 t 1 = 0.2048 s t_1=0.2048s t1=0.2048s,起始频率 f s t a r t = 250 H z f_{start}=250Hz fstart=250Hz,结束频率 f e n d = 2000 H z f_{end}=2000Hz fend=2000Hz,调频斜率 b = f e n d − f s t a r t t 1 − t 0 = 8545 H z / s b=\frac {f_{end}-f_{start}} {t_1-t_0}=8545Hz/s b=t1t0fendfstart=8545Hz/s
假设采样时间 t s = 1 / f s = 100 μ s t_s=1/f_s=100\mu s ts=1/fs=100μs,得到的离散化波形如下:

import matplotlib.pyplot as plt
import numpy as np
def chirpSignal(start_time,start_fre,end_time,end_fre,t):
    return np.cos(2*np.pi*((end_fre-start_fre)/(end_time-start_time)*0.5*(t*t-start_time*start_time)+start_fre*(t-start_time)))
t_start = 0
t_end = 0.2048
fre_start = 250
fre_end = 2000
t_s = 0.0001
y=[]
t_list = np.arange(t_start, t_end, t_s)
for t in t_list:
    y.append(chirpSignal(t_start,fre_start,t_end, fre_end, t))
plt.plot(t_list,y)

import scipy.signal
data = scipy.signal.chirp(t_list, fre_start,t_end, fre_end)
plt.plot(t_list, data)

线性调频信号(Chirp信号)公式_第1张图片

你可能感兴趣的:(信号处理)