简体   繁体   English

Matlab:如何获取正弦信号的幅度和相位

[英]Matlab: How to obtain magnitude and phase of a sinusoidal signal

Given two signals: 给定两个信号:

x1 = A1*exp(j*2*pi*f1*t + Phi1); 
x2 = A1*exp(j*2*pi*f1*t + Phi1) + A2*exp(j*2*pi*f2*t + Phi2);

Matlab should be able to calculate magnitude and phase: Matlab应该能够计算幅度和相位:

abs(x1) = A1;
angle(x1) = Phi1;

abs(x2) = A1+A2;
angle(x2) = Phi1+Phi2;

Is this correct? 这个对吗? I am really not sure about x2. 我真的不确定x2。 Now, I am given a sinusoidal signal: 现在,我得到一个正弦信号:

x3 = A3*cos(2*pi*f3*t + Phi3); 
x4 = A3*cos(2*pi*f3*t + Phi3) + A4*cos(2*pi*f4*t + Phi4);

What will abs() / angle() of these signals yield? 这些信号的abs()/ angle()将产生什么?

The complex envelope of x2 is given by: x2的复数包络由下式给出:

A1*exp(j*2*pi*(f1-f2)/2 t + Phi1) + A2*exp(j*2*pi*(f2-f1)/2 t + Phi2) 

assuming a carrier frequency that is between f1 and f2. 假设载波频率在f1和f2之间。 The amplitude and also the phase of the complex envelope should be somewhat equivalent to the original signal. 复包络的幅度和相位应在一定程度上等于原始信号。 Now I wonder, is it? 现在我想知道,是吗?

EDIT: I am still not sure what exactly you need, but perhaps this identity might me helpful: 编辑:我仍然不确定您到底需要什么,但是也许这种身份可能对我有帮助:

cos(a) = [exp(j*a) + exp(-j*a) ] / 2

If you need to estimate (some of) the parameters A, f, Phi, take a look at the Discrete Time Fourier Transform (DTFT). 如果您需要估计(某些)参数A,f,Phi,请看一下离散时间傅立叶变换(DTFT)。 This page for example has the math of least squares sinusoidal parameter estimation . 例如,此页面具有最小二乘正弦参数估计的数学运算。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM