A list,
Power spectrum estimation is a method to estimate the power spectrum density of a signal, which is used to characterize the relationship between the energy characteristics of a signal and the frequency. It is a common analysis method in the field of signal processing. It can be divided into three categories:
Direct method: period graph method (PSD), Pwelch
Filter bank based methods: Capon, Slapain
Parameterized model-based methods: AR, MA, ARMA
This chapter describes the basic definition of power spectrum estimation, namely autocorrelation estimation and direct method estimation.
1 Basic Definitions
2. Problems faced
There are two problems:
Due to the window problem can produce a lower resolution, frequency spectrum leakage problem (main lobe width of band – > low resolution, frequency spectrum leakage is a fixed frequency jitter around, such as near 30 hz sine signal FFT 30 hz is an obvious peak sidelobe, points to the energy of the main lobe), as shown in the figure below, if the data length is approaching infinite, the resolution, the better, The middle section gets narrower and narrower and leaks less.
3 improvement method – direct method
This chapter mainly describes the improved method of direct method
3.1 Periodic graph method
Ii. Source code
function varargout = SsbForm(varargin)
% SSBFORM M-file for SsbForm.fig
% SSBFORM, by itself, creates a new SSBFORM or raises the existing
% singleton*.
%
% H = SSBFORM returns the handle to a new SSBFORM or the handle to
% the existing singleton*.
%
% SSBFORM('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SSBFORM.M with the given input arguments.
%
% SSBFORM('Property'.'Value',...). creates anew SSBFORM or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before SsbForm_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to SsbForm_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Copyright 2002- 2003. The MathWorks, Inc.
% Edit the above text to modify the response to help SsbForm
% Last Modified by GUIDE v2. 5 07-Dec- 2008. 11:26:04
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @SsbForm_OpeningFcn, ...
'gui_OutputFcn', @SsbForm_OutputFcn, ...
'gui_LayoutFcn', [],...'gui_Callback'[]);if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before SsbForm is made visible.
function SsbForm_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to SsbForm (see VARARGIN)
% Choose default command line output for SsbForm
bg=imread('P6.bmp');
axes(handles.axes1);
imshow(bg);
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes SsbForm wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = SsbForm_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu1
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor'.'white');
else
set(hObject,'BackgroundColor',get(0.'defaultUicontrolBackgroundColor'));
end
% --- Executes on selection change in popupmenu2.
function popupmenu2_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu2 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu2
% --- Executes during object creation, after setting all properties.
function popupmenu2_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor'.'white');
else
set(hObject,'BackgroundColor',get(0.'defaultUicontrolBackgroundColor'));
end
% --- Executes on selection change in popupmenu3.
function popupmenu3_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu3 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu3
% --- Executes during object creation, after setting all properties.
function popupmenu3_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor'.'white');
else
set(hObject,'BackgroundColor',get(0.'defaultUicontrolBackgroundColor'));
end
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global BW CW F t ts
t=[-pi:ts:pi];
ts=0.01;
if get(handles.popupmenu1,'value')= =1
elseif get(handles.popupmenu1,'value') = =2
BW='5*sin(t)'
elseif get(handles.popupmenu1,'value') = =3
BW='10*sin(t)'
elseif get(handles.popupmenu1,'value') = =4
BW='15*sin(t)'
end
if get(handles.popupmenu3,'value') = =1
elseif get(handles.popupmenu3,'value') = =2
F=5
elseif get(handles.popupmenu3,'value') = =3
F=10
elseif get(handles.popupmenu3,'value') = =4
F=15
end
if get(handles.popupmenu2,'value') = =1
elseif get(handles.popupmenu2,'value') = =2
CW='cos(2*pi*F*t)'
elseif get(handles.popupmenu2,'value') = =3
CW='sin(2*pi*F*t)'
end
if get(handles.popupmenu1,'value') = =1 | get(handles.popupmenu2,'value') = =1|get(handles.popupmenu3,'value') = =1
warndlg('Unfilled Parameter !!! ')
else
if get(handles.popupmenu1,'value') = =2
set(handles.edit1,'string'.'BW=5*sin(t)');
elseif get(handles.popupmenu1,'value')= =3
set(handles.edit1,'string'.'BW=10*sin(t)');
elseif get(handles.popupmenu1,'value')= =4
set(handles.edit1,'string'.'BW=15*sin(t)');
end
if CW=='sin(2*pi*F*t)'
set(handles.edit2,'string'.'CW=sin(2*pi*F*t)');
elseif CW=='cos(2*pi*F*t)'
set(handles.edit2,'string'.'CW=cos(2*pi*F*t)');
end
if F==5
set(handles.edit3,'string'.'FC=5');
elseif F==10
set(handles.edit3,'string'.'FC=10')
elseif F==15
set(handles.edit3,'string'.'FC=15')
end
end
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close all
SsbForm
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close
SysFirstF
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor'.'white');
else
set(hObject,'BackgroundColor',get(0.'defaultUicontrolBackgroundColor'));
end
Copy the code
3. Operation results
Fourth, note
Version: 2014 a