Discrete-time equivalent systems example from matlab: the c2d command

Similar documents
Handout 1 - Introduction to plots in Matlab 7

Problem Set #1 Problem Set Due: Friday, April 12

ECE438 - Laboratory 4: Sampling and Reconstruction of Continuous-Time Signals

Problem Weight Total 100

4.4 The FFT and MATLAB

1 Overview. 1.1 Digital Images GEORGIA INSTITUTE OF TECHNOLOGY. ECE 2026 Summer 2018 Lab #5: Sampling: A/D and D/A & Aliasing

EE 261 The Fourier Transform and its Applications Fall 2007 Problem Set Two Due Wednesday, October 10

Module 8 : Numerical Relaying I : Fundamentals

1 Overview. 1.1 Digital Images GEORGIA INSTITUTE OF TECHNOLOGY. ECE 2026 Summer 2016 Lab #6: Sampling: A/D and D/A & Aliasing

Chapter 2 Signals. 2.1 Signals in the Wild One-Dimensional Continuous Time Signals

Course Web site:

OCTAVE C 3 D 3 E 3 F 3 G 3 A 3 B 3 C 4 D 4 E 4 F 4 G 4 A 4 B 4 C 5 D 5 E 5 F 5 G 5 A 5 B 5. Middle-C A-440

Signals and Systems. Spring Room 324, Geology Palace, ,

Design of Speech Signal Analysis and Processing System. Based on Matlab Gateway

Multirate Signal Processing: Graphical Representation & Comparison of Decimation & Interpolation Identities using MATLAB

10:15-11 am Digital signal processing

Experiment # 5. Pulse Code Modulation

with - < n < +. There are two types of approximations associated with the sampling process. finite precision of the ADC finite sampling frequency.

Using Multiple DMs for Increased Spatial Frequency Response

MULTISIM DEMO 9.5: 60 HZ ACTIVE NOTCH FILTER

Lab 1 Introduction to the Software Development Environment and Signal Sampling

Recommended Operations

Laboratory Assignment 3. Digital Music Synthesis: Beethoven s Fifth Symphony Using MATLAB

An Effective Filtering Algorithm to Mitigate Transient Decaying DC Offset

Digital Image and Fourier Transform

ECE 45 Homework 2. t x(τ)dτ. Problem 2.2 Find the Bode plot (magnitude and phase) and label all critical points of the transfer function

Math and Music: The Science of Sound

EE 350. Continuous-Time Linear Systems. Recitation 2. 1

Experiment 2: Sampling and Quantization

DSP First Lab 04: Synthesis of Sinusoidal Signals Music Synthesis. A k cos(ω k t + φ k ) (1)

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL of ELECTRICAL and COMPUTER ENGINEERING

Book: Fundamentals of Music Processing. Audio Features. Book: Fundamentals of Music Processing. Book: Fundamentals of Music Processing

System Identification

Audio Processing Exercise

DHANALAKSHMI COLLEGE OF ENGINEERING Tambaram, Chennai

Lab experience 1: Introduction to LabView

Lab 5 Linear Predictive Coding

DSP First Lab 04: Synthesis of Sinusoidal Signals - Music Synthesis

Digitization: Sampling & Quantization

DEPARTMENT OF THE ARMY TECHNICAL BULLETIN CALIBRATION PROCEDURE FOR AUTOMATIC VIDEO CORRECTOR TEKTRONIX, MODEL 1440 (NSN )

Lab P-6: Synthesis of Sinusoidal Signals A Music Illusion. A k cos.! k t C k / (1)

ECE-320 Lab 5: Modeling and Controlling a Pendulum

Lab 2, Analysis and Design of PID

Voice Controlled Car System

Lecture 1: What we hear when we hear music

Hewlett Packard 3577A 5Hz MHz Network Analyzer Specifications SOURCE

Design and analysis of non-uniform rate digital controllers

ECE438 - Laboratory 1: Discrete and Continuous-Time Signals

PCM ENCODING PREPARATION... 2 PCM the PCM ENCODER module... 4

Lab 2: A/D, D/A, and Sampling Theorem

Mathematics 5 SN SINUSOIDAL GRAPHS AND WORD PROBLEMS

Introduction: Overview. EECE 2510 Circuits and Signals: Biomedical Applications. ECG Circuit 2 Analog Filtering and A/D Conversion

Lab P5: Synthesis of Sinusoidal Signals Music Synthesis

חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור קורס גרפיקה ממוחשבת 2009/2010 סמסטר א' Image Processing

Digital Signal. Continuous. Continuous. amplitude. amplitude. Discrete-time Signal. Analog Signal. Discrete. Continuous. time. time.

Suverna Sengar 1, Partha Pratim Bhattacharya 2

DATA COMPRESSION USING THE FFT

DIRECT DIGITAL SYNTHESIS AND SPUR REDUCTION USING METHOD OF DITHERING

ENGINEERING COMMITTEE

Upgrading E-learning of basic measurement algorithms based on DSP and MATLAB Web Server. Milos Sedlacek 1, Ondrej Tomiska 2

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL AND ELECTRONIC ENGINEERING SEMESTER 2 EXAMINATION 2016/2017

Lecture 3, Opamps. Operational amplifiers, high-gain, high-speed

Fourier Integral Representations Basic Formulas and facts

Spectrum Analyser Basics

Overview. Teacher s Manual and reproductions of student worksheets to support the following lesson objective:

The Cocktail Party Effect. Binaural Masking. The Precedence Effect. Music 175: Time and Space

EE369C: Assignment 1

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT /12/14 BIT 10 TO 105 MSPS ADC

Bioengineering 508: Physical Aspects of Medical Imaging Nature of Medical Imaging. Nature of Medical Imaging

Basic rules for the design of RF Controls in High Intensity Proton Linacs. Particularities of proton linacs wrt electron linacs

DECAYING DC COMPONENT EFFECT ELIMINATION ON PHASOR ESTIMATION USING AN ADAPTIVE FILTERING ALGORITHM

MIE 402: WORKSHOP ON DATA ACQUISITION AND SIGNAL PROCESSING Spring 2003

ANALYSIS OF COMPUTED ORDER TRACKING

EE 200 Problem Set 3 Cover Sheet Fall 2015

A new displacement-sensitive phono cartridge A novel design which dispenses with RIAA equalisation by Richard Brice

AN INTEGRATED MATLAB SUITE FOR INTRODUCTORY DSP EDUCATION. Richard Radke and Sanjeev Kulkarni

Adaptive Resampling - Transforming From the Time to the Angle Domain

Agilent PN Time-Capture Capabilities of the Agilent Series Vector Signal Analyzers Product Note

MUSIC TRANSCRIPTION USING INSTRUMENT MODEL

The following exercises illustrate the execution of collaborative simulations in J-DSP. The exercises namely a

Dr. David A. Clifton Group Leader Computational Health Informatics (CHI) Lab Lecturer in Engineering Science, Balliol College

Calibrate, Characterize and Emulate Systems Using RFXpress in AWG Series

Flicker experimental set up and visual perception of flicker

DVG-5000 Motion Pattern Option

Manual Supplement. This supplement contains information necessary to ensure the accuracy of the above manual.

THE SIGMA-DELTA MODULATOR FOR MEASUREMENT OF THE THERMAL CHARACTERISTICS OF THE CAPACITORS

FFT Laboratory Experiments for the HP Series Oscilloscopes and HP 54657A/54658A Measurement Storage Modules

QSched v0.96 Spring 2018) User Guide Pg 1 of 6

Tempo Estimation and Manipulation

Problem Weight Score Total 100

ZONE PLATE SIGNALS 525 Lines Standard M/NTSC

UNIVERSITY OF BAHRAIN COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

2. AN INTROSPECTION OF THE MORPHING PROCESS

Signal Processing with Wavelets.

Fourier Transforms 1D

Lecture 18: Exam Review

Laplace Transform: basic properties; functions of a complex variable; poles diagrams; s-shift law.

Digital music synthesis using DSP

EECS 556 Winter 2007 Exam2 Solutions

Department of Electrical & Electronic Engineering Imperial College of Science, Technology and Medicine. Project: Real-Time Speech Enhancement

Transcription:

Discrete-time equivalent systems example from matlab: the cd command Create the -time system using the tf command and then generate the discrete-time equivalents using the cd command. We use this command to generate the Tustin (linear transformation) equivalent discrete-time equivalent of the -time system preceded by a zero-order hold. We generate three such discrete-time equivalents with sampling times T =.5,.5,.5 seconds.that is sampling at, and Hertz. >> csys = tf(,[ ]) csys = ----- s + Continuous-time transfer function. >> dsys_slow = cd(csys,.5, ) dsys_slow =. z +. ----------- z -.6 Sample time:.5 seconds >> dsys_mid = cd(csys,.5, ) dsys_mid =.49 z +.49 ------------------- z -.95 Sample time:.5 seconds >> dsys_fast = cd(csys,.5, ) dsys_fast =.494 z +.494 --------------------- z -.995 Sample time:.5 seconds

Step responses Next we generate five-second step responses for each system, recognizing that matlab itself is computing a discretized solution for the -time response. We use the step function generate the discrete time-vectors using the sampling time parameters from tf. >> tcts = [:.:5.] ; >> ycts = step(csys,tcts); >> [yslow,tslow] = step(dsys_slow,5.); >> [ymid,tmid] = step(dsys_mid,5.); >> [yfast,tfast] = step(dsys_fast,5.); >> plot(tcts,ycts,tslow,yslow, o,tmid,ymid, *,tfast,yfast, + );shg >> title( Step responses ) >> xlabel( );ylabel( ); >> legend(, Hz sampling, Hz sampling, Hz sampling ) >> print -dpdf Steps.pdf >> print -dpdf StepsZoom.pdf Step responses Step responses.9.84.8.8.7.8.6.5.4.8.8.79... Hz sampling Hz sampling Hz sampling.5.5.5.5 4 4.5 5.78.77.76.75 Hz sampling Hz sampling Hz sampling.44.46.48.5.5.54.56 Sinusoidal responses at differing frequencies Frequency 4π radians per second,. Hz We have the following discrete-time equivalent frequencies. Sample rate discrete frequency (per sample) π Hz =.π Hz =.π Hz =. >> sin_slow = sin(4*pi/*tslow);

>> sin_mid = sin(4*pi/*tmid); >> sin_fast = sin(4*pi/*tfast); >> sin_cts = sin(4*pi/*tcts); >> ys_slow = lsim(dsys_slow,sin_slow,tslow); >> ys_mid = lsim(dsys_mid,sin_mid,tmid); >> ys_fast = lsim(dsys_fast,sin_fast,tfast); >> ys_cts = lsim(csys,sin_cts,tcts); >> plot(tcts,ys_cts,tslow,ys_slow, o,tmid,ys_mid, *,tfast,ys_fast, + );shg >> title( Slow sine responses ) >> xlabel( );ylabel( ); >> legend(, Hz sampling, Hz sampling, Hz sampling ) >> print -dpdf SlowSine.pdf >> print -dpdf SlowSineZoom.pdf.4. Slow sine responses Hz sampling Hz sampling Hz sampling.. Slow sine responses Hz sampling Hz sampling Hz sampling..8..6.4 -... -..8 -..5.5.5.5 4 4.5 5.6.9.94.96.98..4 Frequency 4π radians per second,.hz We have the following discrete-time equivalent frequencies. Sample rate discrete frequency (per sample) Hz aliased π Hz =.π Hz = >> sinf_mid = sin(4*pi/*tmid); >> sinf_fast = sin(4*pi/*tfast); >> sinf_cts = sin(4*pi/*tcts); >> ysf_mid = lsim(dsys_mid,sinf_mid,tmid); >> ysf_fast = lsim(dsys_fast,sinf_fast,tfast); >> ysf_cts = lsim(csys,sinf_cts,tcts); >> plot(tcts,ysf_cts,tmid,ysf_mid, *,tfast,ysf_fast, + );shg >> title( Midrange sine responses ) >> xlabel( );ylabel( ); >> legend(, Hz sampling, Hz sampling ) >> print -dpdf MidSine.pdf

>> print -dpdf MidSineZoom.pdf.5.4 Midrange sine responses Hz sampling Hz sampling.5. Midrange sine responses Hz sampling Hz sampling..5....5 -.5 -. -. -.5 -. -. -..5.5.5.5 4 4.5 5 -.5.98..4.6.8...4.6.8 Frequency 4π radians per second,.hz We have the following discrete-time equivalent frequencies. Sample rate discrete frequency (per sample) Hz aliased Hz aliased.π Hz = >> sins_fast=sin(4*pi/*tfast); >> sins_cts=sin(4*pi/*tcts); >> yss_fast=lsim(dsys_fast,sins_fast,tfast); >> yss_cts=lsim(csys,sins_cts,tcts); >> plot(tcts,yss_cts,tfast,yss_fast, + );shg >> title( Fast sine responses ) >> xlabel( );ylabel( ); >> legend(, Hz sampling ) >> print -dpdf FastSine.pdf >> print -dpdf FastSineZoom.pdf Frequency 4π radians per second,.hz; with frequency pre-warping Let us try to match the responses at this high frequency π/ c per sample by using Tustin s method with frequency pre-warping. This is done by scaling the s-plane by a factor f so that the scaled s-domain point, s = jfω, maps to the correct z-domain point, z = e jωt. The bilinear transformation of Tustin has s T z z + and thus z + T s T s.

# - 5 4 Fast sine responses Hz sampling # -.5 Fast sine responses Hz sampling.5.5 -.5 - - - -.5 - -.5.5.5.5 4 4.5 5..4.5.6.7.8.9. If we use the above elements, this means solving This has the solution f = [ cos ωt ] ωt sin ωt. z = e jωt = + jf T ω jf T ω. We find the pre-warped system by substituting for s as above into s+. dsys warp(z) = = = = z z+ +, z + z + z +, ( + + z + ) z + ( z + z + / +/. ), >> omt = *pi/ % omega T value in z-domain omt =.944 >> f=*(-cos(omt))/omt/sin(omt) % f-value for pre-warping the s-domain f =.654 >> tft = /f/.5 % / value tft =

4.899 >> dsys_warp = tf([ ]/(+tft),[ (-tft)/(+tft)],.5) % as is the formula above dsys_warp =.48 z +.48 --------------------- z -.998 Sample time:.5 seconds Now try the fast sinusoid input signal again. We see that the pre-warping matches very well. # - 5 4 # -.5.5 -.5 - - -.5 - - - 5 5 5 5 4 45 5 9.45 9.44 9.445 9.45 9.455 9.46 My mistake in interpreting the figure in class was to fail to recognize the period-three nature of the fast sinusoid it really only takes on three distinct value. If we alter the frequency a little we see a different plot where the intercept points move to different parts of the input sinusoid. >> *pi/ ans =.944 >> sinsd_cts = sin(4*tcts); >> sinsd_fast = sin(4*tfast); >> yssd_cts=lsim(csys,sinsd_cts,tcts); >> yssd_fast=lsim(dsys_fast,sinsd_fast,tfast); >> yssd_warp=lsim(dsys_warp,sinsd_fast,tfast); >> plot(tcts,yssd_cts,tfast,yssd_fast, o,tfast,yssd_warp, k+ );shg But what happens to the step response of this pre-warped system? It all goes down the toilet at dc ( c per sample) because it fits at π/ c per sample and we can only pre-warp to fit at one point on the unit circle.

# - 5 4.5 # -.5.5 -.5 - - -.5 - - - 8.7 8.8 8.9 9 9. 9. 9. 9.4 9.5 -.5 8.8 8.84 8.86 8.88 8.9 8.9 8.94 8.96 8.98 9 9..9 Step Response pre-warped.8.7.6 Amplitude.5.4....5.5.5.5 4 4.5 5 Time (seconds)