Download
symbolic analysis and design of communication systems using computer algebra systems n.
Skip this Video
Loading SlideShow in 5 Seconds..
Symbolic analysis and design of communication systems using computer algebra systems PowerPoint Presentation
Download Presentation
Symbolic analysis and design of communication systems using computer algebra systems

Symbolic analysis and design of communication systems using computer algebra systems

167 Vues Download Presentation
Télécharger la présentation

Symbolic analysis and design of communication systems using computer algebra systems

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Symbolic analysis and design of communication systems using computer algebra systems Prof. Dr Miroslav Lutovac Dr Dejan TošićSchool of Electrical Engineering at the University of Belgrade, Serbia

  2. Overview • Get back to basic understanding • Numeric vs. Symbolic Computation • Computer as a symbol processor • Schematic as a symbolic object • Programs as knowledge repositories • A step by step example: QAM • Benefits from symbolic techniques

  3. James Kaiser - 50 years of SP • It has become so easy to do so much computation using computers that people will press keys on the keyboard without thinking what they are doing • It's so easy to generate a tremendous amount of garbagethat you've got to understand what it is you're doing Fifty Years of SP (1998), page 54

  4. James Kaiser: “back to basics” • So it is very important that we get back to basic understanding, get a much better grounding of what science underlies the phenomenon we are looking at • I mean, this world is not an ideal world • It's time-varying and nonlinear Fifty Years of SP (1998), page 54

  5. James Kaiser: “understand tools” • Young people or anybody, really who are using these tools have got to thoroughly understandwhat assumptions underlie the tool that they are using • That will tell them what they can expect to get out Fifty Years of SP (1998), page 54

  6. Numerical ambiguity: 0.3 - 0.1 == 0.2? >> a = 0.3-0.1 a = 0.2000 >> b = 0.2 b = 0.2000 >> a==b ans = 0 MATLAB Command Window 0.3 – 0.1 ≠ 0.2

  7. Why is 0.3-0.1 ≠ 0.2 ? MATLAB Command Window >> sym(0.8-0.6,'d') ans = .20000000000000006661338147750939 >> sym(0.2,'d') ans = .20000000000000001110223024625157 >> sym(0.3-0.1,'d') ans = .19999999999999998334665463062265 >> sym(0.6-0.4,'d') ans = .19999999999999995559107901499374

  8. Numeric vs. Symbolic Computation >> (2/10)==(1-8/10) ans = 0 >> sym(2/10)==sym(1-8/10) ans = 1 >> a=1; a=a-0.2; a=a-0.2; a=a-0.2; a=a-0.2; a=a-0.2 a = 5.5511e-017 Numeric is false Symbolic is true a ≈ 0, a ≠ 0

  9. Numeric simulation might fail

  10. Symbolic computation finds exact solution

  11. Algebraic loop • Symbolic analysis of systems is inherently immune to the problem imposed by algebraic loops occurring when two or more blocks with direct feed-through of their inputs form a feedback loop • Numeric simulations of algebraic loops considerably reduce the speed of a simulation and may be unsolvable • Symbolic simulation successfully and accurately computes the required response;it finds the exact solution

  12. Computer as a symbol processor • Computers have become recognized as symbol processors(Oppenheim and Nawab 1992) • Program can be viewed as a set of instructions for manipulating symbols • Numbers are only one of the kinds of symbols that the computer can handle

  13. Schematic as a symbolic object • System model is a symbolic object • It contains all details for drawing, symbolic solving, simulating, and implementing: • Analyze the schematic as the symbolic object • Identify symbolic system parameters • Knowledge embedded in the schematic object can be used to generate implementation code or to derive transfer function

  14. From schematic to system property system = { {"Multiplier", {{6, 0}, {6, 3}}, k1}, {"Delay", {{4, 5}, {4, 7}}, 1}, {"Adder",{{7,8},{8,5},{9,8},{8,9}},{1,1,2,0}}, {"Input", {0, 8}, "X"}, {"Output", {9, 8}, "Y1L"}, ..., {"Line", {{6, 8}, {7, 8}}} } 1. Find transfer function s = H1*(H1/. z->1/z) + H2*(H2/. z->1/z) //FullSimplify 2. Simplify expression

  15. Computer as intelligence amplifier • Symbol processor with the appropriate programs is usable on a much wider range of tasks, such as intelligence amplifier or augmenting our ability to think • Programming has become a task of knowledge accumulation telling the computer what to know, when to use, and how to apply the knowledge in solving problems

  16. What to know - How to apply • WHAT TO KNOW: symbolic object that contains a procedure for automated generation of the schematic for an arbitrary number of parts • HOW TO APPLY: draw system, solve symbolically, simulate, and implement system • Automatically generate system parameters • Automatically generate schematic with symbolic or numeric parameters • Solve symbolically: find the transfer function, impulse response, or property of the system from the schematic • Automatically generate implementation code • Simulate for specified symbolic parameter values

  17. What to know - When to use • WHAT TO KNOW: symbolic object that contains a procedure for automated generation of the schematic for an arbitrary number of parts • WHEN TO USE: • When Laplace or z-transform cannot be found • When numeric computations fail • When symbolic expressions have a large number of parameters • When derivation by hand is very time consuming and difficult • When symbolic optimization can reduce the number of parameters used in numeric optimization

  18. Knowledge repositories • Programs are viewed as knowledge repositories • Programs should be written to communicate … • … not simply to compute

  19. Programs as knowledge repositories 1. draw basic part of system 5. Save as function, add knowledge of a system {schematicSpec, inps, outs} = SchematicFunction[params, …{x0, y0}, options] 2. draw input (* generate schematic by replicating the basic part *) numberOfStages = 7; adaptiveSystem = TranslateSchematic[... adaptiveSystem = Join[adaptiveSystem, ... Do[adaptiveSystem = Join[adaptiveSystem,... aK -> ToExpression["a"~StringJoin~ ... {k, numberOfStages}]; 3. draw output 4. write code

  20. Automated drawing of systems numStages = 3 Invoke from the knowledge repository p = UnitSymbolicSequence[numStages + 1, k, 0] parameterSymbols = Join[{b}, p] // Flatten {hsSystem, inpCoordsHS, outCoordsHS} = HighSpeedIIR3FIRHalfbandFilterSchematic[parameterSymbols]; ShowSchematic[hsSystem]

  21. Programs written to communicate system = { {"Multiplier",{{6,0},{6,3}},k1}, {"Delay",{{4,5},{4,7}},1}, {"Adder",{{7,8},...,{1,1,2,0}}, {"Input",{0,8},"X"},..., {"Line",{{6,8},{7,8}}}}

  22. Solve: find transfer function of all outputs {Y3L/X, Y3H/X}

  23. Proving the property of the system s = H1*(H1/. z->1/z) + H2*(H2/. z->1/z) //FullSimplify

  24. Deriving new property s = H1*(H1/. z->1/z) + H2*(H2/. z->1/z) //FullSimplify Solve[s == 1, k0] num3 = Numerator[h3L//Together]/. z -> -1 Solve[num3==0, k2]

  25. Deriving design equations

  26. Generating implementation code DiscreteSystemImplementation[hsSystem,"hsf"] 1. Output variables {{Y9p8, Y9p0, Y31p0}, {Y4p5, Y4p3, Y2p8}} = hsf[{Y0p8},{Y4p7, Y4p5, Y28p0}, {b, k0, k1, k2, k3}] is the template for calling the procedure. The general template is {outputSamples, finalConditions} = procedureName[inputSamples, initialConditions, systemParameters]. See also: DiscreteSystemImplementationProcessing 2. Input variables 3. System parameters 4. Usage

  27. Get information about implementation procedure ??implementationProcedure implementationProcedure[dataSamples_List, initialConditions_List,systemParameters_List]:= Module[{Y0p10,Y4p9,Y4p3,a2,a3,b1,b2,b3}, {a2,a3,b1,b2,b3}=systemParameters; {Y0p10}=dataSamples; {Y4p9,Y4p3}=initialConditions; Y3p0=b3 Y0p10;Y3p4=b2 Y0p10;Y3p10=b1 Y0p10;Y4p5=Y3p4+Y4p3;Y8p10=Y3p10+Y4p9;Y5p0=a3 Y8p10;Y5p6=a2 Y8p10;Y4p1=Y3p0-Y5p0;Y4p7=Y4p5-Y5p6;{{Y8p10},{Y4p7,Y4p1}}] 1. Variables 2. Input variables 3. Initial conditions 4. Code

  28. 1. Symbolic parameter 2. Transfer function 3. Time response

  29. Transfer function matrix of MIMO system

  30. Symbolic simulation Transfer function Simulation with symbolic system parameters

  31. Symbolic processing numberInSamples = 20; inputSequence = UnitImpulseSequence[numberInSamples]; eqns = DiscreteSystemImplementationEquations[hsSystem];initialConditions = 0*eqns[[2]]systemParameters = eqns[[3]] {outputSeq, finalCond}=DiscreteSystemImplementationProcessing[inputSequence, initialConditions, systemParameters, hsf]; Each element of the output sequence is a symbolic expression

  32. Response in time domain p={b→9/16,k0→0.24000685,k1→2.37428,k2→-0.54068,k3→0.1093268} y=InverseZTransform[hsSystem /. p, z, n] Use z-transform (if it exists)

  33. How to synthesize a discrete system? • For known transfer functionH(z) = ( 1 + 2 z-1 + z-2 ) / ( 1 + ½z-2 )create schematic of the system{schematic, {inpCoord}, {outCoord}} =TransposedDirectForm2IIRFilterSchematic[{{1,2,1},{0,1/2}}]; • Add input element and output elementsystem = Join[schematic,{{"Input",inpCoord,X}, {"Output",outCoord,Y}}] • Draw the block-diagramShowSchematic[system] Invoke from the knowledge repository

  34. Discrete systems analysis:Find response from the schematic • Compute transfer function from the schematic{tfMatrix, systemInp, systemOut} = DiscreteSystemTransferFunction[system];tf = tfMatrix[[1, 1]]; • Input signal represented by a formulasineSignal = Sin[n/5]; • Find output signalsineTransform = ZTransform[sineSignal, n, z];response = InverseZTransform[sineTransform*tf,z,n]

  35. Discrete systems analysisusing symbolic processing • Generate a code that implements the systemDiscreteSystemImplementation[system, "imp"]; • Compute input sequence whose elements can be symbols, numbers, or formulasinSeq = UnitSineSequence[8, 1/(10 π), 0]; • Process the input sequence with the code{outSeq,finals} = DiscreteSystemImplementationProcessing[inSeq,{0,0},{},imp]; The seventh element of the output sequence is not a number; it is an expression

  36. Comparing multirate realizations outClassic outSeq

  37. Quadrature Amplitude Modulation A step by step example

  38. What is QAM? • Quadrature Amplitude Modulation (QAM) is a widely used method for transmitting digital data over bandpass channels • The simulation of a simplified and idealized QAM system follows

  39. Read-in the knowledge

  40. Generate the transmitter part

  41. Generate the demodulator part

  42. Generate the filter part

  43. Generate the complete system

  44. Generate the implementation code

  45. Generate the input sequences

  46. Process the input sequences with the system

  47. Simulate the input sequences with the system

  48. Miscellaneous examples

  49. Hilbert Transformer

  50. Hilbert Transformer in QAM