Act 10 Cristhian Caballero AP 2

download Act 10 Cristhian Caballero AP 2

of 20

Transcript of Act 10 Cristhian Caballero AP 2

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    1/20

    Procesamiento Digital de Seales cd. 299004_142

    Actividad 10 Trabajo Colaborativo No 2.

    Presentado por:

    Cristhian Enrique Caballero

    Cd. 13871131

    TUTOR

    Ana Isabel Bolaos

    UNIVERSIDAD NACIONAL ABIERTA Y A DISTANCIA

    CEAD BUCARAMANGA

    2. Semestre del 2013

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    2/20

    1.Investigacin: De acuerdo al siguiente cdigo de MatLab propuesto:

    [b,a] = cheby1(12,0.5,200/500);[h,f] = freqz(b,a,256,1000);mag=abs(h);

    subplot(121)plot(f,mag)fase=unwrap(f*180/pi);subplot(122)plot(f,fase)

    a) Corra el programa y explique qu hace cada lnea. Aqu se recomienda usar elhelp del MatLab como soporte.

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    3/20

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    4/20

    b) Realice un anlisis y conclusiones sobre las grficas obtenidas.

    En este programa se usa un filtro de Chebyshev de tipo I este nicamentetienen polos, presentan un rizado constante en la banda pasante ypresentan una cada montona en la banda de rechazo.

    La frecuencia de corte no depende de N y el mdulo de su respuesta en

    frecuencia oscila (rizado) entre 1 y .

    Cabe anotar que el numero de oscilaciones aumenta a medida que elpolinomio de Chebyshev de la funcin es de mayor orden.

    Son usados para separar bandas de frecuencias (Pasa-bajos, pasa-altos,pasa-banda o suprime banda) Son filtros recursivos y por lo tanto, muy rpidos de ejecutar.

    Estn diseados para tener el roll-off ms rpido posible a costa de

    permitir ripple. Son filtros ptimos en este sentido: dado el orden (cantidadde polos) y el ripple permitido, tienen el roll-off ptimo. El ripple est presente en la banda pasante o en la banda atenuante, pero

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    5/20

    no en ambas. Involucran un compromiso entre el roll-off y el ripple. Cuanto mayor es el

    ripple permitido, mas rpido es el roll-off.

    2.Herramientas para el anlisis de filtros digitales.

    a) Investigue acerca de la herramienta FVtool de MatLab.

    fvtool

    Herramienta de Visualizacin Filter (FVTool)

    Syntax

    fvtool(b,a)fvtool(sos)fvtool(b1,a1,b2,a2,...bN,aN)fvtool(sos1,sos2,...,sosN)fvtool(Hd)fvtool(Hd1,Hd2,...,HdN)h=fvtool(...)

    fvtool (b, a) se abre FVTool y muestra la respuesta en magnitud del filtro digitaldefinido con numerador, b y el denominador, un. Usando FVTool puede mostrar la

    respuesta de fase, el retardo de grupo, la respuesta al impulso, respuesta de paso,la trama de polos y ceros, y los coeficientes del filtro. Puede exportar la respuestaaparece a un archivo con Archivo> Exportar.

    Nota: Si la entrada al fvtool es de precisin simple, la respuesta de magnitud secalcula utilizando la aritmtica de precisin simple.

    VTOOL (sos ) FVTool abre y muestra la respuesta en magnitud del filtro digital sedefine con la matriz de secciones de segundo orden , sos . SOS es una matriz deK - por - 6 , donde el nmero de secciones , K , debe ser mayor que o igual a 2 . Siel nmero de secciones es inferior a 2 , fvtool considera la entrada a ser el vectorde numerador , b . Cada fila de SOS corresponde a los coeficientes de unsegundo orden ( biquad ) de filtro . El i-sima fila de la matriz corresponde a SOS [bi ( 1 ) bi ( 2 ) bi ( 3 ) ai ( 1 ) ai ( 2 ) ai ( 3 ) ] .

    fvtool ( b1, a1, b2 , a2, ... Bn, aN ) FVTool abre y muestra las respuestas demagnitud de varios filtros definidos con numeradores , B1 ... B1N y denominadores, a1 ... an.

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    6/20

    fvtool ( SOS1 , SOS2 , ..., sosN ) FVTool abre y muestra las respuestas demagnitud de varios filtros definidos con matrices de segundo orden de la seccin ,SOS1 , SOS2 , ... sosN .

    fvtool ( Alta Definicin ) FVTool abre y muestra las respuestas de magnitud para el

    objeto dfilt filtro, Hd, o el conjunto de objetos de filtro dfilt .

    fvtool ( hd1, HD2 , ..., HDN) FVTool abre y muestra las respuestas en magnitud delos filtros de los objetos dfilt HD1 , HD2 , ... HDN .

    Si usted tiene el DSP System Toolbox producto instalado, tambin puedeutilizar fvtool (H ) y fvtool (H1 , H2 , ...) para analizar :

    Objetos de filtro cuantificada ( dfilt con la aritmtica est en modo " single" o"fijo" )Filtro ( mfilt ) objetos MultirateFiltro adaptativo ( adaptfilt ) objetosCualquiera de los siguientes objetos del sistema de filtro.

    Los siguientes objetos de sistema de filtro son compatibles con esta funcin deanlisis.

    ilter System objects

    dsp.FIRFilter

    dsp.FIRInterpolator

    dsp.CICInterpolator

    dsp.FIRDecimator

    dsp.CICDecimator

    dsp.FIRRateConverter

    dsp.BiquadFilter

    dsp.IIRFilter

    dsp.AllpoleFilter

    dsp.AllpassFilter

    dsp.CoupledAllpassFilter

    Cuando el filtro de entrada es un objeto dfilt o mfilt , FVTool realiza anlisis depunto fijo si la propiedad aritmtica de los objetos de filtro est establecida en "fijo". Sin embargo , para los objetos del sistema de filtro , fvtool ( H , ' Aritmtica' ,

    ARITH , ... ) analiza H , sobre la base de la aritmtica especificado en la entradaARITH .

    http://www.mathworks.com/help/dsp/ref/dsp.firfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firinterpolatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firinterpolatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.cicinterpolatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.cicinterpolatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firdecimatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.cicdecimatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firrateconverterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firrateconverterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.biquadfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.iirfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.allpolefilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.allpolefilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.allpassfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.allpassfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.coupledallpassfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.coupledallpassfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.coupledallpassfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.allpassfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.allpolefilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.iirfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.biquadfilterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firrateconverterclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.cicdecimatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firdecimatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.cicinterpolatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firinterpolatorclass.htmlhttp://www.mathworks.com/help/dsp/ref/dsp.firfilterclass.html
  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    7/20

    ARITH puede ser uno de ' doble' , 'single' o ' fija ' . La entrada ' Aritmtica' slo esrelevante para el anlisis de los objetos del sistema de filtro. La aritmticaestablecer ARITH , se aplica a todos los objetos del sistema de filtro que deentrada a fvtool . Cuando se especifica ' doble' o 'single' , la funcin realiza el

    anlisis de doble o simple precisin . Cuando se especifica "fijo" , la aritmticacambia dependiendo de la configuracin de la propiedad CoefficientDataType y siel objeto del sistema est bloqueado o desbloqueado.

    Detalles para la aritmtica de punto fijo

    Si no se especifica el clculo de estructuras no - CIC , y el objeto del sistema esten un estado desbloqueado , la funcin utiliza la aritmtica de doble precisin . Siel objeto del sistema est bloqueada , la funcin realiza el anlisis basado en eltipo de datos de entrada de bloqueo. Estructuras CIC solo soportan aritmtica depunto fijo .

    Anlisis de los mtodos noisepsd y freqrespest tienen restricciones decomportamiento en fvtool . Para ver las reglas, haga clic en los enlaces a estosmtodos.

    h = fvtool (... ) devuelve un identificador h figura. Usted puede utilizar esteidentificador para interactuar con FVTool desde la lnea de comandos. ConsulteControl FVTool desde la lnea de comandos de MATLAB.

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    8/20

    FVTool tiene dos barras de herramientas.

    Una versin extendida de la barra de herramientas de edicin de parcela MATLAB. En la siguiente tabla se muestran los iconos de la barra de herramientasespecficas para FVTool.

    con Description

    Restore default view. This view displays buffer regions around the data and shows only significant data.

    To see the response using standard MATLAB plotting, which shows all data values, use View> Full

    View.

    Toggle legend

    Toggle grid

    Link to FDATool (appears only if FVTool was started from FDATool)

    Toggle Add mode/Replace mode (appears only if FVTool was launched from FDATool)

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    9/20

    con Description

    Barra de herramientas de anlisis con los siguientes iconos

    Magnitude response of the current filter. Seefreqzandzerophasefor more information.

    To see the zero-phase response, right-click the y-axis label of the Magnitude plot and select Zero-

    phasefrom the context menu.

    Phase response of the current filter. Seephasezfor more information.

    Superimposes the magnitude response and the phase response of the current filter. Seefreqzfor

    more information.

    Shows the group delay of the current filter. Group delay is the average delay of the filter as a function of

    frequency. Seegrpdelayfor more information.

    Shows the phase delay of the current filter. Phase delay is the time delay the filter imposes on each

    component of the input signal. Seephasedelayfor more information.

    Impulse response of the current filter. The impulse response is the response of the filter to a impulse

    input. Seeimpzfor more information.

    Step response of the current filter. The step response is the response of the filter to a step input.

    Seestepzfor more information.

    Pole-zero plot, which shows the pole and zero locations of the current filter on the z-plane.

    Seezplanefor more information.

    Filter coefficients of the current filter, which depend on the filter structure (e.g., direct-form, lattice, etc.)

    in a text box. For SOS filters, each section is displayed as a separate filter.

    Detailed filter information.

    Controlar FVTool desde la lnea de comandos de MATLAB

    Despus de obtener el identificador para FVTool, puede controlar algunosaspectos de FVTool desde la lnea de comandos. Adems de las propiedadesestndar manejar grficos (vase manejar grficos en la documentacin deMATLAB), FVTool tiene las siguientes propiedades:

    ' Filters' - devuelve una matriz de celdas de los filtros en FVTool.

    " Analysis" - muestra el tipo especfico de parcela anlisis. En la siguiente tabla semuestran los anlisis y las cadenas de anlisis correspondientes. Tenga en cuentaque slo los anlisis que utilizan filtros internos son estimacin de respuesta demagnitud y la potencia de ruido de redondeo, que estn disponibles slo con elproducto Caja de herramientas Sistema de DSP.

    alysis Type Analysis String

    http://www.mathworks.com/help/signal/ref/freqz.htmlhttp://www.mathworks.com/help/signal/ref/freqz.htmlhttp://www.mathworks.com/help/signal/ref/freqz.htmlhttp://www.mathworks.com/help/signal/ref/zerophase.htmlhttp://www.mathworks.com/help/signal/ref/zerophase.htmlhttp://www.mathworks.com/help/signal/ref/zerophase.htmlhttp://www.mathworks.com/help/signal/ref/phasez.htmlhttp://www.mathworks.com/help/signal/ref/phasez.htmlhttp://www.mathworks.com/help/signal/ref/phasez.htmlhttp://www.mathworks.com/help/signal/ref/freqz.htmlhttp://www.mathworks.com/help/signal/ref/freqz.htmlhttp://www.mathworks.com/help/signal/ref/freqz.htmlhttp://www.mathworks.com/help/signal/ref/grpdelay.htmlhttp://www.mathworks.com/help/signal/ref/grpdelay.htmlhttp://www.mathworks.com/help/signal/ref/grpdelay.htmlhttp://www.mathworks.com/help/signal/ref/phasedelay.htmlhttp://www.mathworks.com/help/signal/ref/phasedelay.htmlhttp://www.mathworks.com/help/signal/ref/phasedelay.htmlhttp://www.mathworks.com/help/signal/ref/impz.htmlhttp://www.mathworks.com/help/signal/ref/impz.htmlhttp://www.mathworks.com/help/signal/ref/impz.htmlhttp://www.mathworks.com/help/signal/ref/stepz.htmlhttp://www.mathworks.com/help/signal/ref/stepz.htmlhttp://www.mathworks.com/help/signal/ref/stepz.htmlhttp://www.mathworks.com/help/signal/ref/zplane.htmlhttp://www.mathworks.com/help/signal/ref/zplane.htmlhttp://www.mathworks.com/help/signal/ref/zplane.htmlhttp://www.mathworks.com/help/signal/ref/zplane.htmlhttp://www.mathworks.com/help/signal/ref/stepz.htmlhttp://www.mathworks.com/help/signal/ref/impz.htmlhttp://www.mathworks.com/help/signal/ref/phasedelay.htmlhttp://www.mathworks.com/help/signal/ref/grpdelay.htmlhttp://www.mathworks.com/help/signal/ref/freqz.htmlhttp://www.mathworks.com/help/signal/ref/phasez.htmlhttp://www.mathworks.com/help/signal/ref/zerophase.htmlhttp://www.mathworks.com/help/signal/ref/freqz.html
  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    10/20

    alysis Type Analysis String

    Magnitude plot 'magnitude'

    Phase plot 'phase'

    Magnitude and phase plot `freq'

    Group delay plot 'grpdelay'

    Phase delay plot `phasedelay'

    Impulse response plot 'impulse'

    Step response plot 'step'

    Pole-zero plot 'polezero'

    Filter coefficients 'coefficients'

    Filter information'info'

    Magnitude response estimate

    (available only with the DSP System Toolbox product, seefreqrespestfor more

    information)

    'magestimate'

    Round-off noise power

    (available only with the DSP System Toolbox product, seenoisepsdfor more

    information)

    'noisepower'

    'Grid' - controla si la red es 'on' o 'off'

    'Legend ' - controla si la leyenda es 'on' o 'off'

    ' Fs ' - controla la frecuencia de muestreo de filtros en FVTool . El vector defrecuencia de muestreo debe ser de la misma longitud que el nmero de filtros oun valor escalar. Si se trata de un vector, cada valor se aplica a su filtrocorrespondiente. Si es un escalar , el mismo valor se aplica a todos los filtros .

    SosViewSettings - ( . Esta opcin est disponible slo si tiene el producto DSPSystem Toolbox ) Para los filtros de secciones de segundo orden , esto controlacmo se muestra el filtro. La propiedad SOSViewSettings contiene un objeto por loque debe utilizar esta sintaxis para configurarlo : set ( h.SOSViewSettings , ' View'

    , ViewType ), donde ViewType es uno de los siguientes:

    " Complete" - Muestra la respuesta completa del filtro global' Individuall' - Muestra la respuesta de cada seccin por separado' Cumulative ' - Muestra la respuesta para cada seccin acumulada con cadaseccin previa. Si el filtro tiene tres secciones, la primera seccin se muestra undiagrama , el segundo grfico muestra la acumulacin de los apartados uno y dos,y la tercera parcela mostrar la acumulacin de las tres secciones .

    http://www.mathworks.com/help/dsp/ref/freqrespest.htmlhttp://www.mathworks.com/help/dsp/ref/freqrespest.htmlhttp://www.mathworks.com/help/dsp/ref/freqrespest.htmlhttp://www.mathworks.com/help/dsp/ref/noisepsd.htmlhttp://www.mathworks.com/help/dsp/ref/noisepsd.htmlhttp://www.mathworks.com/help/dsp/ref/noisepsd.htmlhttp://www.mathworks.com/help/dsp/ref/noisepsd.htmlhttp://www.mathworks.com/help/dsp/ref/freqrespest.html
  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    11/20

    Tambin puede definir si desea utilizar SecondaryScaling , lo que determina quelas secciones deben dividirse . Los puntos de escala secundarios son los lugaresde escala entre el recursiva y las partes no recursivas de la seccin . El valorpredeterminado es falso , que no utiliza la escala secundaria. Para activar laescala secundaria , utilice esta sintaxis : set ( h.SOSViewSettings , ' View', '

    acumulado ', true )

    ' UserDefined ' - Permite definir qu secciones para mostrar y el orden en el quelos muestra . Introduzca un arreglo de celdas donde cada seccin estrepresentado por su ndice . Si se introduce un ndice , slo que el artculo se traza. Si introduce una serie de ndices , se grafica la respuesta combinada de eserango de secciones . Por ejemplo , si el filtro tiene cuatro secciones , entrando {01:04 } parcelas de la respuesta combinada de las cuatro secciones , y entrando {1,2,3,4 } parcelas de la respuesta para cada seccin individualmente .

    b) Proponga tres ejemplos de aplicacin de la herramienta FVtool donde muestrelas grficas:

    Respuesta de Magnitud Respuesta de faseRespuesta de retardo de grupoRespuesta de retardo de faseRespuesta al impulsoRespuesta al escalnGrfico de polos y ceros.

    c) Analice y comente cada grfica obtenida en el punto b)

    Ejemplos

    Example 1Display the magnitude response of an elliptic filter, starting FVTool from the command line:

    [b,a]=ellip(6,3,50,300/500);

    fvtool(b,a);

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    12/20

    Example 2Display and analyze multiple FIR filters, starting FVTool from the command line. Then, display the associated

    analysis parameters for the magnitude:

    b1 = firpm(20,[0 0.4 0.5 1],[1 1 0 0]);

    b2 = firpm(40,[0 0.4 0.5 1],[1 1 0 0]);

    fvtool(b1,1,b2,1);

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    13/20

    Example 3Create a lowpass, equiripple filter of order 20 in FDATool and display it in FVTool.

    fdatool % Start FDATool

    Set these parameters infdatool:

    http://www.mathworks.com/help/signal/ref/fdatool.htmlhttp://www.mathworks.com/help/signal/ref/fdatool.htmlhttp://www.mathworks.com/help/signal/ref/fdatool.htmlhttp://www.mathworks.com/help/signal/ref/fdatool.html
  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    14/20

    Parameter Setting

    Response Type Lowpass

    Design Method FIR Equiripple

    Filter Order Specify order: 20

    Density factor 16

    Frequency specifications units Normalized (0 to 1)

    Wpass 0.4

    Wstop 0.5

    Magnitude specifications -- Wpass and Wstop 1

    and then click the Design Filterbutton.

    Click the Full View Analysisbutton to start FVTool.

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    15/20

    Example 4Create an elliptic filter and use some of FVTool's figure handle commands:

    [b,a]=ellip(6,3,50,300/500);

    h = fvtool(b,a); % Create handle, h and start FVTool

    % with magnitude plot

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    16/20

    set(h,'Analysis','phase') % Change display to phase plot

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    17/20

    set(h,'Legend','on') % Turn legend on

    legend(h,'Phase plot') % Add legend text

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    18/20

    get(h) % View all properties

    % FVTool-specific properties are

    % at the end of this list.

    AlphaMap: [1x64 double]

    CloseRequestFcn: 'closereq'

    Color: [0.8314 0.8157 0.7843]

    ColorMap: [64x3 double]

    CurrentAxes: 208.0084

    CurrentCharacter: ''

    CurrentObject: []

    CurrentPoint: [0 0]

    DockControls: 'on'

    DoubleBuffer: 'on'

    FileName: ''

    FixedColors: [11x3 double]

    IntegerHandle: 'on'

    InvertHardcopy: 'on'

    KeyPressFcn: ''

    MenuBar: 'none'

    MinColormap: 64

    Name: 'Filter Visualization Tool - Phase Response'

    NextPlot: 'new'

    NumberTitle: 'on'

    PaperUnits: 'inches'

    PaperOrientation: 'portrait'

    PaperPosition: [0.2500 2.5000 8 6]

    PaperPositionMode: 'manual'

    PaperSize: [8.5000 11]

    PaperType: 'usletter'

    Pointer: 'arrow'

    PointerShapeCData: [16x16 double]

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    19/20

    PointerShapeHotSpot: [1 1]

    Position: [360 292 560 345]

    Renderer: 'painters'

    RendererMode: 'auto'

    Resize: 'on'

    ResizeFcn: ''

    SelectionType: 'normal'

    Toolbar: 'auto'

    Units: 'pixels'

    WindowButtonDownFcn: ''

    WindowButtonMotionFcn: ''

    WindowButtonUpFcn: ''

    WindowStyle: 'normal'

    BeingDeleted: 'off'

    ButtonDownFcn: ''

    Children: [15x1 double]

    Clipping: 'on'

    CreateFcn: ''

    DeleteFcn: ''

    BusyAction: 'queue'

    HandleVisibility: 'on'

    HitTest: 'on'

    Interruptible: 'on'

    Parent: 0

    Selected: 'off'

    SelectionHighlight: 'on'

    Tag: 'filtervisualizationtool'

    UIContextMenu: []

    UserData: []

    Visible: 'on'

    AnalysisToolbar: 'on'

    FigureToolbar: 'on'

  • 8/13/2019 Act 10 Cristhian Caballero AP 2

    20/20

    Filters: {[1x1 dfilt.df2t]}

    Grid: 'on'

    Legend: 'on'

    DesignMask: 'off'

    Fs: 1

    SOSViewSettings: [1x1 dspopts.sosview]

    Analysis: 'phase'

    OverlayedAnalysis: ''

    ShowReference: 'on'

    PolyphaseView: 'off'

    NormalizedFrequency: 'on'

    FrequencyScale: 'Linear'

    FrequencyRange: '[0, pi)'

    NumberofPoints: 8192

    FrequencyVector: [1x256 double]

    PhaseUnits: 'Radians'

    PhaseDisplay: 'Phase'