1. Trang chủ
  2. » Thể loại khác

Modeling with Linear Functions

24 43 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 24
Dung lượng 1,23 MB

Nội dung

Using the Explorer IDE After a plot has been selected, you can change its properties via the Plot Properties dialog accessible from the right-mouse button within the plot window. The Plot Prop- erties dialog allows you to set generic, axis, and signal attributes. Generic plot attributes include the plot type as well as display of titles and/or subti- tles. Axis properties of the plot allow you to set the axis styles for both the X- and Y-axis, including labels and tic-mark styles. Verilog-A Explorer IDE 197 Verilog-A Explorer IDE Signal properties allow you to edit the description of the signals displayed in the leg- end box, as well as the data format and drawing attributes. D.3.2 Creating a New Designs Starting a new design follows essentially the same procedure as previously outlined, but with the addition to creating a new circuit and/or Verilog-A file(s). From the main Explorer menu, select File->New, which raises the following dialog box: If you select a circuit file, the workspace will be cleared of any open files. If you select a Verilog-A file, it is assumed that it is associated with any existing circuit design open within the workspace. In both cases, a new file is created and initialized with a template file of the appropriate type. If you prefer your own template files, change the path of the template via the respective Editor Properties dialog accessible via the right mouse button. 198 Verilog-A HDL Appendix E Spice Quick Reference E.1 Introduction Spice is a general-purpose circuit simulation program for nonlinear DC, nonlinear transient, and linear AC analysis. Originating from the University of California at Berkeley, is by far the best known and most widely used circuit simulator. It is availa- ble in for a wide variety of computer platforms, in both commercial and proprietary derivatives of the original version. Newer versions of Spice offer many extensions, but the input format for circuit descriptions reflect the original batch-oriented program architecture. This appendix overviews the Spice input format, or netlist files including the fundamental types and analyses supported. Omitted for brevity are details regarding semiconductor device models and the various Spice options. Spice Quick Reference 199 Spice Quick Reference E.2 Circuit Netlist Description The netlist (also referred to as the input deck) consists of element lines which describes both the circuit topology and element values and control lines which describe analyses to be performed for Spice. The first card in the input deck must be a title card, and the last card must be the .END control line. The order of the remaining element and control lines is arbitrary. The input format is free format. Fields on an element or control line are separated by one or more blanks, commas, equal (=) sign, or a left or right parenthesis. A element or control line may be continued by placing a (+) in column 1 on the following line. Spice will continue reading beginning with column 2. Name fields must begin with a letter [a–z] and cannot contain any delimeters. Names within Spice netlists are considered case-insensitive 1 . An integer or a floating point number can be followed by one of the following scale factors: G = 1.0e9 MEG = 1.0e6 K = 1.0e3 MIL = 25.4e-4 M = 1.0e-3 U = 1.0e-6 N = l.0e-9 P = 1.0e-12 1. Names in Verilog are case-sensitive requiring a certain level of awareness for modelers in developing Verilog-A models that are case-independent for use within Spice netlists. 200 Verilog-A HDL Spice Quick Reference 201 E.3 Components Letters immediately following a Modeling with Linear Functions Modeling with Linear Functions By: OpenStaxCollege 1/24 Modeling with Linear Functions (credit: EEK Photography/Flickr) Emily is a college student who plans to spend a summer in Seattle She has saved $3,500 for her trip and anticipates spending $400 each week on rent, food, and activities How can we write a linear model to represent her situation? What would be the x-intercept, and what can she learn from it? To answer these and related questions, we can create a model using a linear function Models such as this one can be extremely useful for analyzing relationships and making predictions based on those relationships In this section, we will explore examples of linear function models 2/24 Modeling with Linear Functions Identifying Steps to Model and Solve Problems When modeling scenarios with linear functions and solving problems involving quantities with a constant rate of change, we typically follow the same problem strategies that we would use for any type of function Let’s briefly review them: Identify changing quantities, and then define descriptive variables to represent those quantities When appropriate, sketch a picture or define a coordinate system Carefully read the problem to identify important information Look for information that provides values for the variables or values for parts of the functional model, such as slope and initial value Carefully read the problem to determine what we are trying to find, identify, solve, or interpret Identify a solution pathway from the provided information to what we are trying to find Often this will involve checking and tracking units, building a table, or even finding a formula for the function being used to model the problem When needed, write a formula for the function Solve or evaluate the function using the formula Reflect on whether your answer is reasonable for the given situation and whether it makes sense mathematically Clearly convey your result using appropriate units, and answer in full sentences when necessary Building Linear Models Now let’s take a look at the student in Seattle In her situation, there are two changing quantities: time and money The amount of money she has remaining while on vacation depends on how long she stays We can use this information to define our variables, including units • Output: M, money remaining, in dollars • Input: t, time, in weeks So, the amount of money remaining depends on the number of weeks: M(t) We can also identify the initial value and the rate of change • Initial Value: She saved $3,500, so $3,500 is the initial value for M • Rate of Change: She anticipates spending $400 each week, so –$400 per week is the rate of change, or slope 3/24 Modeling with Linear Functions Notice that the unit of dollars per week matches the unit of our output variable divided by our input variable Also, because the slope is negative, the linear function is decreasing This should make sense because she is spending money each week The rate of change is constant, so we can start with the linear model M(t) = mt + b Then we can substitute the intercept and slope provided To find the x-intercept, we set the output to zero, and solve for the input = − 400t + 3500 t= 3500 400 = 8.75 The x-intercept is 8.75 weeks Because this represents the input value when the output will be zero, we could say that Emily will have no money left after 8.75 weeks When modeling any real-life scenario with functions, there is typically a limited domain over which that model will be valid—almost no trend continues indefinitely Here the domain refers to the number of weeks In this case, it doesn’t make sense to talk about input values less than zero A negative input value could refer to a number of weeks before she saved $3,500, but the scenario discussed poses the question once she saved $3,500 because this is when her trip and subsequent spending starts It is also likely that this model is not valid after the x-intercept, unless Emily will use a credit card and goes into debt The domain represents the set of input values, so the reasonable domain for this function is ≤ t ≤ 8.75 In the above example, we were given a written description of the situation We followed the steps of modeling a problem to analyze the information However, the information provided may not always be the same Sometimes we might be provided with an intercept Other times we might be provided with an output value We must be careful to analyze the information we are given, and use it appropriately to build a linear model 4/24 Modeling with Linear Functions Using a Given Intercept to Build a Model Some real-world problems provide the y-intercept, which is the constant or initial value Once the y-intercept is known, the x-intercept can be calculated Suppose, for example, that Hannah plans to pay off a no-interest loan from her parents Her loan balance is $1,000 She plans to pay $250 per month until her balance is $0 The y-intercept is the initial amount of ...Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. ANALOG BEHAVIORAL MODELING WITH THE VERILOG-A LANGUAGE Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. ANALOG BEHAVIORAL MODELING WITH THE VERILOG-A LANGUAGE by Dan FitzPatrick Apteq Design Systems, Inc. and Ira Miller Motorola KLUWER ACADEMIC PUBLISHERS NEW YORK, BOSTON, DORDRECHT, LONDON, MOSCOW Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. eBook ISBN: 0-306-47918-4 Print ISBN: 0-7923-8044-4 ©2003 Kluwer Academic Publishers New York, Boston, Dordrecht, London, Moscow Print ©1998 Kluwer Academic Publishers All rights reserved No part of this eBook may be reproduced or transmitted in any form or by any means, electronic, mechanical, recording, or otherwise, without written consent from the Publisher Created in the United States of America Visit Kluwer Online at: http://kluweronline.com and Kluwer's eBookstore at: http://ebooks.kluweronline.com Dordrecht Disk only available in print edition Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Contents 1 Introduction 1.2 1.3 Motivation Product Design Methodologies The Role of Standards 1.3.1 Verilog-A as an Extension of Spice 1.4 The Role of Verilog-A 1.4.1 Looking Ahead to Verilog-AMS 2 Analog System Description and Simulation 2.1 2.2 Introduction Representation of Systems 2.2.1 2.2.2 2.2.3 Anatomy of a Module Structural Descriptions Behavioral Descriptions 2.3 Mixed-Level Descriptions Refining the Module 2.4 Types of Analog Systems Conservative Systems Branches v 1 1 3 7 8 9 10 11 11 12 13 14 16 19 22 25 25 26 2.3.1 2.4.1 2.4.2 1.1 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Analog Behavioral Modeling With the Verilog-A Language 2.4.3 Conservation Laws In System Descriptions 2.4.4 Signal-Flow Systems 2.5 Signals in Analog Systems 2.5.1 2.5.2 2.5.3 Access Functions Implicit Branches Summary of Signal Access 2.6 Probes, Sources, and Signal Assignment 2.6.1 2.6.2 2.6.3 Probes Sources Illustrated Examples 2.7 Analog System Simulation 2.7.1 Convergence 3 Behavioral Descriptions 3.1 3.2 3.3 Introduction Behavioral Descriptions 3.2.1 Analog Model Properties Statements for Behavioral Descriptions 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 Analog Statement Contribution Statements Procedural or Variable Assignments Conditional Statements and Expressions Multi-way Branching 3.4 Analog Operators 3.4.1 3.4.2 3.4.3 Time Derivative Operator Time Integral Operator Delay Operator 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 Transition Operator. Slew Operator Laplace Transform Operators Z-Transform Operators Considerations on the Usage of Analog Operators 3.5 Analog Events 3.5.1 3.5.2 Cross Event Analog Operator Timer Event Analog Operator 3.6 Additional Constructs 3.6.1 Access to Simulation Environment vi 27 29 29 31 32 33 33 34 35 37 38 40 41 41 42 43 45 45 47 48 49 51 53 53 55 57 58 62 64 68 74 74 75 78 80 80 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Contents 3.6.2 3.6.3 3.6.4 Indirect Contribution Statements Case Statements Iterative Statements 3.7 Developing Behavioral Models 3.7.1 3.7.2 3.7.3 Development Methodology System and Use Considerations Style 4 Declarations and Structural Descriptions 4.1 4.2 4.3 Introduction Module Overview 4.2.1 4.2.2 4.2.3 Introduction to Interface Declarations Introduction to Local Declarations Introduction to Structural Instantiations Module Interface Declarations 4.3.1 Port Signal Types and Directions 4.3.2 Parameter Declarations 4.4 Local Declarations 4.5 Module Instantiations 4.5.1 4.5.2 4.5.3 Positional and Named Association Example Assignment of Parameters Connection of Ports 5 Applications 5.1 5.2 Introduction Behavioral Modeling of a Common Emitter 15 Analog System Description and Simulation Structural definitions in the Verilog-A language facilitate the use of top-down design methodologies. As architectural design progresses, structural and behavioral defini- tions with finer details of description can be substituted for determining the system Representation of Systems endmodule A module instantiation in the Verilog-A language is similar to a variable declaration in programming languages. The module type name declares the module instance type, followed by optional parameter settings (within the “#( )” construct), the instance name, and the connection list. From Listing 2.2, the following is used to illustrate the module instantiation syntax: The module type name qam_mod creates the instance named mod. The mod instance is passed the value fc as the value for the parameter carrier_freq to the instance. The instance is connected to signals cin, din and clk within the defini- tion of the module modem. The instantiation for the qam_mod instance mod, and the other two component instantiations within the modem module definition in Listing 2.2 declares the design hierarchy of Figure 2.2. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Analog System Description and Simulation performance to specifications. Utilizing this capability requires no more than an understanding of the parameter and port definitions of a module. 2.2.3 Behavioral Descriptions The Verilog-A language provides for describing the behavior of analog and mixed- signal systems. The analog behavioral descriptions are encapsulated within analog statements (or blocks) within a module definition. The behavioral descriptions are mathematical mappings which relate the input signals of the module to output signals in terms of a large-signal or time-domain behavioral description. The mapping uses the Verilog-A language contribution operator “<+” which assigns an expression to a signal. The assigned expression can be linear, non-linear, algebraic and/or differential functions of the input signals. These large-signal behavioral descriptions define the constitutive relationship of the module, and take the form: output_signal <+ f( input_signal ); In signal contribution, the right-hand side expression, or f( input_signal ),is evaluated, and its value is assigned to the output signal. Consider, for instance, the representation of a resistor connected between electrical nodes n1 and n2: The constitutive relationship of the element could be encapsulated as a module defini- tion in the Verilog-A language as shown in the resistor module definition of List- ing 2.3. LISTING 2.3 Verilog-A module of the resistor in Figure 2.3. module resistor(n1, n2); inout n1, n2; electrical n1, n2; parameter real R = 1.0; analog 16 Verilog-A HDL Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 17 Analog System Description and Simulation I(n1, n2) <+ isat*( exp (V(n1, n2)/ $vt ()) - 1.0); The behavior of the diode can be defined in the Verilog-A language as, This simple way of representing the behavior of the system allows designers to easily explore more complex constructs like non-linear behaviors, as in the diode in Figure 2.4. It is important to note that the contribution operator is a concise description of the behavior of the element in terms of its terminal voltages and currents. The simulator becomes responsible for making sure that the relationship established by the contribu- tion operator is satisfied at each point in RESEARCH Open Access Real-time detection of musical onsets with linear prediction and sinusoidal modeling John Glover * , Victor Lazzarini and Joseph Timoney Abstract Real-time musical note onset detection plays a vital role in many audio analysis processes, such as score following, beat detection and various sound synthesis by analysis methods. This article provides a review of some of the most commonly used techniques for real-time onset detection. We suggest ways to improve these techniques by incorporating linear prediction as well as presenting a novel algorithm for real-time onset detection using sinusoidal modelling. We provide comprehensive results for both the detection accuracy and the computational performance of all of the described techniques, evaluated using Modal, our new open source library for musical onset detection, which comes with a free database of samples with hand-labelled note onsets. 1 Introduction Many real-time musical signal-processing applications depend on the temporal segmentation of the audio sig- nal into discrete note events. Systems such as s core fol- lowers [1] may use detected note events to interact directly with a live performer. Beat-synchronous analysis systems [2,3] group detected notes into beats, where a beat is the dominant time unit or metric pulse of the music, then use t his knowledge to improve an underly- ing analysis process. In so und synthesis by analysis, the choice of proces- sing algorithm will often depend on the characteristics of the sound source. Spectral processing tools such as the Phase Vocoder [4] are a well-established means of time-stretching and pitch-shifting harmonic musical notes, but they have well-documented weaknesses in dealing with noisy or transient signals [5]. For real-time applications of tools such as the Phase Vocoder, it may not be possible to depend on any prior knowledge of the signal to select the processing algorithm, and so we must be able to identify transient regions on-the-fly to reduce sy nthesis artefacts. It is within this context that onset detection will be studied in this article. While there have been several recent studies that examin ed musical note onset detection [6-8], there have been few that analysed the re al-time performa nce of the published techniques. One of the aims of this article is to provide such an overview. In Section 2, some of the common onset-detection techni ques from the l iterature are described. In Section 3.1, we suggest a way to improve on these techniques by incorporating linear prediction (LP) [9]. In Section 4.1, we present a novel onset-detection method that uses sinusoidal modelling [10]. Section 5.1 introduces Modal,ournewopen source library for musical onset detection. This is then used to evaluate all of the previously described algo- rithms, with the results being given in Sections 5.2 and 5.3, and then discussed in Section 5.4. Th is evaluation includes details of the performance of all of the algo- rithms in terms of both accuracy and computational requirements. 2 Real-time onset detection 2.1 Definitions This article distinguishes between the terms audio buffer and audio frame as follows: Audio b uffer: A group of consecutive audio samples taken from the input signal. The algorithms in th is arti- cle all use a fixed buffer size of 512 samples. Audio frame: A group of consecutive audio buffers. All the algorithms described here operate on overlap- ping, fixed-sized frames of audio. RESEARCH Open Access Real-time detection of musical onsets with linear prediction and sinusoidal modeling John Glover * , Victor Lazzarini and Joseph Timoney Abstract Real-time musical note onset detection plays a vital role in many audio analysis processes, such as score following, beat detection and various sound synthesis by analysis methods. This article provides a review of some of the most commonly used techniques for real-time onset detection. We suggest ways to improve these techniques by incorporating linear prediction as well as presenting a novel algorithm for real-time onset detection using sinusoidal modelling. We provide comprehensive results for both the detection accuracy and the computational performance of all of the described techniques, evaluated using Modal, our new open source library for musical onset detection, which comes with a free database of samples with hand-labelled note onsets. 1 Introduction Many real-time musical signal-processing applications depend on the temporal segmentation of the audio sig- nal into discrete note events. Systems such as s core fol- lowers [1] may use detected note events to interact directly with a live performer. Beat-synchronous analysis systems [2,3] group detected notes into beats, where a beat is the dominant time unit or metric pulse of the music, then use t his knowledge to improve an underly- ing analysis process. In so und synthesis by analysis, the choice of proces- sing algorithm will often depend on the characteristics of the sound source. Spectral processing tools such as the Phase Vocoder [4] are a well-established means of time-stretching and pitch-shifting harmonic musical notes, but they have well-documented weaknesses in dealing with noisy or transient signals [5]. For real-time applications of tools such as the Phase Vocoder, it may not be possible to depend on any prior knowledge of the signal to select the processing algorithm, and so we must be able to identify transient regions on-the-fly to reduce sy nthesis artefacts. It is within this context that onset detection will be studied in this article. While there have been several recent studies that examin ed musical note onset detection [6-8], there have been few that analysed the re al-time performa nce of the published techniques. One of the aims of this article is to provide such an overview. In Section 2, some of the common onset-detection techni ques from the l iterature are described. In Section 3.1, we suggest a way to improve on these techniques by incorporating linear prediction (LP) [9]. In Section 4.1, we present a novel onset-detection method that uses sinusoidal modelling [10]. Section 5.1 introduces Modal,ournewopen source library for musical onset detection. This is then used to evaluate all of the previously described algo- rithms, with the results being given in Sections 5.2 and 5.3, and then discussed in Section 5.4. Th is evaluation includes details of the performance of all of the algo- rithms in terms of both accuracy and computational requirements. 2 Real-time onset detection 2.1 Definitions This article distinguishes between the terms audio buffer and audio frame as follows: Audio b uffer: A group of consecutive audio samples taken from the input signal. The algorithms in th is arti- cle all use a fixed buffer size of 512 samples. Audio frame: A group of consecutive audio buffers. All the algorithms described here operate on overlap- ping, fixed-sized frames of audio. ... will explore examples of linear function models 2/24 Modeling with Linear Functions Identifying Steps to Model and Solve Problems When modeling scenarios with linear functions and solving problems... a given y-value 5/24 Modeling with Linear Functions Answer the question posed Using a Linear Model to Investigate a Town’s Population A town’s population has been growing linearly In 2004 the... Building Systems of Linear Models Real-world situations including two or more linear functions may be modeled with a system of linear equations Remember, when solving a system of linear equations,

Ngày đăng: 31/10/2017, 17:07