SIGNAL GENERATOR
The present invention relates to a signal generator for generating signals which simulate noise or sound.
More particularly, the invention relates to a signal generator for generating signals which simulate sound or noise emanating from a periodic source.
The object of the present invention is to provide a signal generator which can simulate noise emanating from a periodic noise source and to provide the capability of external triggering so that the frequency of the signals varies so as to simulate changes in operating conditions of the noise source.
One application of the generator of the invention is in relation to motor vehicles. Some motoring enthusiasts find it desirable to listen to engine noises of a particular type, such as engine noise of sports cars, racing cars or the like. Sports cars and racing cars which produce the desirable engine noises are usually expensive and some enthusiasts are unable to afford to buy cars of this character. The generator of the invention can be fitted to a much cheaper vehicle which does not produce engine noises of the desired character. Also, environmental regulators usually require engines to be relatively quiet and this can be effectively bypassed for an enthusiast without violating the regulations. The generator of the invention generates signals which can be inputted to an audio system of the enthusiast's vehicle so that engine noise having the desirable characteristics can be simulated. In this application, the signal generator can receive triggering signals derived from the engine of the vehicle in which it is fitted so that the simulated engine noise will correspond to the operating conditions of the vehicle. Thus, in this arrangement, the frequency of the simulated engine noise will be directly proportional to the operating speed of the engine of the vehicle.
According to the present invention there is provided a signal generator for generating signals which simulate noise emanating from a periodic noise source, said signal generator including: storage means for reference signals representative of the noise emanating from the source during at least one period of the noise source at a predetermined frequency; input means to which can be coupled triggering signals; and processing means responsive to said trigger signals for generating a periodic output signal from a series of said reference serials, the periods of which are related to triggering signals applied to said input means.
Preferably, the storage means stores reference signals which represent a complete stroke of a reference internal combustion engine.
Preferably further, the periodic output signal comprises a generally continuous series of the reference signals to simulate noise from an internal combustion engine.
Preferably, the triggering signals are derived from an external periodic source whereby the periodic output signal simulates noise from an internal combustion engine operating at a rate determined by said external periodic source.
Preferably, the signal generator is adapted to be used in a vehicle having an internal combustion engine and wherein the triggering signals are derived from the vehicle's engine, the arrangement being such that the output signals represent the noise of the reference internal combustion engine operating at a rate which corresponds to the vehicle's engine.
It is possible to simulate a number of different engine noises such as idle, acceleration, cruising and deceleration so that the simulated noise can give a more accurate simulation of engine noise during operation of the vehicle.
The invention also provides a method of generating signals for simulating noise emanating from a noise source comprising the steps of storing reference signals representative of at least one period of the noise at a particular frequency emanating from a reference source, providing triggering signals to processing means which generates periodic output signals which comprise a series of reference signals, the periods of which are controlled by the triggering signals.
The invention will now be further described with reference to the accompanying drawings, in which:
Figure 1 is a block diagram of a circuit which includes the signal generator of the invention;
Figure 2 is a more detailed block diagram;
Figure 3 is a more detailed block diagram of the signal generator of the invention; Figure 4 shows the front panel layout of the signal generator;
Figures 5 to 8 are waveform diagrams which are useful in understanding the operation of the invention;
Figures 9 to 16 are circuit diagrams for the signal generator of the invention; and Figure 17 is a flowchart illustrating the main steps in the invention.
Figure 1 diagrammatically shows a circuit which includes a simulator 2 of the invention. The simulator 2 produces output signals which are coupled to an amplifier 4, the output of which is coupled to a loudspeaker 6. As will be described below, the simulator 2 produces output signals which simulate engine noise appears as an audible output from the loudspeaker 6. Where the simulator 2 of the invention is to be used in an automobile, it can be coupled between a CD (or cassette player) 8 and the amplifier 4.
Figure 2 diagrammatically illustrates the simulator 2 in more detail. It includes a sound generator 10, the output of which is coupled to a volume control circuit 12, the output of which is coupled to one input of a mixer 14. The other input of the mixer 14 receives input
signals from the CD player 8 via input terminals 16. The output of the mixer is coupled to the amplifier 4. The simulator 2 can be arranged to produce stereo outputs for providing left and right inputs to speakers 6, as diagrammatically shown in Figure 2.
Figure 3 illustrates the sound generator 10 in more detail. The simulator 2 includes a memory 18 in which reference noise signals are stored. Preferably the signals are stored in digital form. Preferably further, they comprise digitised signals representative of the noise emanating from a reference internal combustion engine having desirable noise characteristics. The generation of these signals will be described in more detail below. The circuit includes a CPU 20 which controls all the essential operations of the simulator 2. The memory 18 also includes instructions for controlling the operation of the CPU 20.
The simulator 2 includes an input terminal 22 to which triggering signals can be applied. In the illustrated arrangement, the triggering signals are derived from the vehicle's ignition system and in particular the coil 24 of the ignition system. A line 26 connects the negative terminal of the coil 24 to the input terminal 22. Accordingly, the triggering signals applied to the input terminal 22 are related to the RPM of the vehicle's engine. The exact relationship between the triggering signals on the line 26 depends on a number of factors including the number of cylinders the engine has. The triggering signals from terminal 22 are coupled to a voltage to frequency converter 28. Each time the voltage drops and rises as the ignition points (or other switching device in the distributor of the vehicle) opens and closes, the change in voltage at the negative terminal of the coil is inputted to the converter 28. These changes are converted to a pulsed digital triggering signal which becomes an internal triggering signal at the same frequency of variation at the negative terminal of the coil. As the engine RPM rises, the frequency of the pulsed internal triggering signal rises. The internal triggering signals from the converter 28 are monitored by the CPU 20. It will be appreciated that there are other ways of generating the external triggering signals which are the same as or proportional to the rate of operation of the engine of the vehicle. For instance, these could be derived from audio signals coupled to receive engine or exhaust noise, tachometer signals, crank revolutions, engine management computers or a combination of throttle and engine
vacuum conditions. These signals could be in the form of voltage or current levels which are monitored by the CPU 20.
The main function of the CPU 20 is to produce an output pulse train on output 30 which comprises a repetitive sequence of the reference signals which are stored in the memory 18, the frequency or period of the output signals being dependent upon the frequency of triggering pulses from the converter 28. The simulator 2 includes a digital to analog converter 32 which converts the signal pulses on output line 30 to analog form which is inputted to the mixer 14. Audio signals, which are representative of the reference engine noise at the particular frequency determined by the rate of operation of the vehicle's coil 24, are generated at the output of the mixer and coupled to output terminals 33. This can therefore produce a realistic simulation of the reference engine noise related to the same operating conditions of the vehicle's engine.
For a four-stroke engine, the reference signals stored in the memory 18 have a period which corresponds to four or more rotations of the crankshaft of the engine so that each cylinder will fire twice. Accordingly, at 500 RPM, the sample would be 480msec long.
For engines having a different number of cylinders, triggering signals from the converter 28 are generated as follows:
Engine type Frequency @ 0RPM Frequency @ 8,000RPM
4 cylinder 0Hz 266.6Hz
6 cylinder 0Hz 400.0Hz
8 cylinder 0Hz 533.3Hz
12 cylinder 0Hz 800.0Hz
For two-stroke engines the frequency would be doubled because the cylinders fire in each revolution of the engine.
The simulator 2 may include a second digital to analog converter 34 which can be used to produce analog signals corresponding to special effects signals which are stored in the memory 18, as will be described below.
The simulator 2 includes a front panel 36 which enable the user to control various functions of the simulator.
Figure 4 diagrammatically illustrates a typical layout for the front panel 36. The front panel 36 includes an LCD display 38 for displaying various functions of the simulator 2. The panel includes a volume control button 40 which is coupled to the mixer output 16 to control the amplitude of the audio signals produced on the audio output terminal 33. A tone control button 42 can be provided to provide selective filtering of base and/or treble components in the usual way. The front panel 36 includes a simulator select button 44 which is coupled to the mixer input 14 to effectively block signals from the CD player 8 and thus pass only the noise simulated signals from the digital to analog converter 32. The panel includes a CD select button 46 which when operated blocks output from the digital to analog converter 32 and passes only signals derived from the CD player 8. The panel includes a mix select button 48 which when selected passes signals from the digital to analog converter 32 as well as the CD player 8. The panel includes a special effects select button 50 which when operated causes the CPU to access special effects signals which are stored in the memory 18 and pass them to the second digital to analog converter 34. The special effects signals may include tyre squeal or simulated signals derived from a different source such as in the engine bay or from an exhaust or turbo charger, super charger or other variation. The special effects signals would normally be combined with the engine simulation signals coupled to the mixer 14. The user preferably can use the panel switches 36, select either signals from the simulator 2 or the CD/radio 8 or a combined output thereof.
Figure 5 schematically illustrates a noise signal waveform 52 derived from a reference engine, and waveform being repetitive as shown by periods TI, T2 and T3.
Figure 6 diagrammatically shows one of the periods of the waveform digitised at sampling points marked by crosses. It is possible to record the sound using commercially available hardware and software. The sampling rates commonly available are 8kHz, 16kHz, 22.05kHz and 44.1kHz. Satisfactory results can be used at a sampling frequency of 22.05kHz to generate 16 bit signals. This produces a reasonable result but it is understood that for higher fidelity reproduction a higher sampling rate would be desirable but this increases both requirements for more memory, storage and higher processor speed. The digitised output can then be used to form the reference signal stored in the memory 18. Alternatively, the reference signal could be derived wholly synthetically rather than being a digitised actual waveform. Figure 7 diagrammatically illustrates an output waveform from the digital to analog converter 32. This waveform has the same shape as the waveform 52 but is increased in frequency (or decreased in period) by the CPU 20 in accordance with triggering signals on the input terminal 22. This of course corresponds to the higher RPM rate of the engine when the vehicle is operating faster. Figure 8 diagrammatically illustrates an output waveform 56 from the digital to analog converter 32 when the engine is operating at a lower rate. It will be seen in this instance that the waveform is essentially the same shape but is reduced in frequency (expanded in period) corresponding to when the engine is operating at a lower RPM. It is desirable that there be no discontinuities between the individual periods so that there are no discontinuities in the simulated noise. Preferably, the reference signal stored in the memory 18 optimally comprises two or more of the complete periods so as to reduce discontinuities in the output waveform and to produce a more realistic result. It is thought that by having the sample covering predetermined number of engine revolutions, any sonic variations between the firing of different cylinders will be captured in the sample to thereby enable capture of the "burble" character of a V8 engine. This may require more than two periods, for instance six or eight periods.
The simulator 2 of the invention can be enhanced if a number of different MODE reference signals are stored in the memory 18 corresponding for instance to the following modes of engine operation: 1. idle/cruise - constant RPM
2. acceleration - increasing RPM
3. deceleration - decreasing RPM
A single sound could be used to provide one complete simulation but there are distinct changes to the character of the sound of an engine depending on its state of operation, i.e. idle, acceleration and deceleration. By having a sample of each of these states and switching from one to another when appropriate, it is possible to more accurately reproduce the true sound of an engine.
For each of the three sound categories there is expected to be at least two representative samples required:
1. low RPM sample - say 500RPM (used for RPM's of say 0 to 1500)
2. mid RPM sample - say 3,000RPM (for RPM's of say 1500 up)
Again it is possible to run the simulator from just one sample or it could be run by switching between more than two samples.
The CPU 20 is programed to switch from one engine state sample to another in accordance with the rate of change of RPM of the vehicle's engine as determined by output from the converter 28: mode 1 - idle/cruise = default mode mode 2 - acceleration = if the rate of change of RPM is greater than 500 RPM per second then switch to acceleration mode, rule: remain in acceleration mode until RPM stops increasing. mode 3 - deceleration = if the rate of change of RPM decreases by say 300RPM per second then switch to deceleration mode, rule: remain in deceleration mode until RPM stops falling.
It has been found that it is difficult to achieve a realistic representation of the full range of sounds from an engine with just two samples stored. It is believed that there are two main reasons for this as follows:
1. Any engine sound changes in character as the RPM changes. In fact there is a continual gradual change in the character of the sound of an engine as the RPM increases from idle up to the engine's upper RPM limit.
2. A digitally recorded sound, which is replayed at a higher or lower frequency than that at which it was recorded, changes in character. This is because all the frequencies which collectively comprise the sound are simultaneously moved up or down in frequency. This change is different in character to the natural change of character in an engine sound.
The net result of the above two factors is that if a sound is recorded at say 1000RPM and then it is replayed up to the equivalent period to simulate an engine at 2000RPM, then the resultant sound is quite different from the actual recorded sound of the engine at 2000RPM. This results in continuity problems when reproducing the sound and moving out of one sound sample (say a 1000RPM sample) and the next, (say a 2000RPM sample).
In order to overcome this problem, it is proposed to use 16 recorded samples. It is preferred that the lowest frequency at 900RPM and other samples recorded with say 7.5% incremental steps for each new recording. The samples are set out in Table 1 below.
TABLE 1
Sample RPM Sample RPM
1 900 9 1605
2 967 10 1725
3 1040 11 1855
4 1118 12 1994
5 1202 13 2143
6 1292 14 2304
7 1389 15 2477
8 1493 16 2663
With the samples as set out above, each sample is close enough in frequency to the previous sample that the change in the character of the sound is minimal from one sample to the next. Further, any increase in frequency of the recorded sample is such that it is small enough that it does not noticeably affect the character of the sound during that relatively small increase in frequency which occurs until the frequency reaches that of the next recorded sample. When that occurs, of course, the next recorded sample will be selected and increased or decreased in frequency as the case may be.
It is thought that normally about 16 recorded samples would be sufficient to provide a relatively seamless continuous and realistic reproduction of the sound of an engine. Better results can of course be obtained using a greater number of recorded samples, say 32, 64 or even more, but this would have increased hardware requirements for the system, particularly for the memory.
The discussion above is applicable to recorded sounds of the engine of a vehicle when it is cruising. In the system of the invention, it is preferred to have corresponding sounds sampled and recorded during acceleration and deceleration. The CPU determines the appropriate sound sample group by determining the rate of change in RPM. At a rate of
change greater than 500 RPM per second in a positive direction the acceleration sound sample group will be chosen. At a rate of change greater than 300 RPM per second in a negative direction the deceleration sound sample group will be chosen. Anything else and the cruise sample group will be chosen.
A method of compensation is preferably provided for fitting the simulator to cars with different engine types, i.e. 4, 6, 8 and 12 cylinders.
A 4 cylinder engine will give 2 firing pulses per revolution.
A 6 cylinder engine will give 3 firing pulses per revolution. An 8 cylinder engine will give 4 firing pulses per revolution.
One revolution of the car's engine must trigger the equivalent of one revolution of the simulated engine sound even if the motor vehicle is fitted with a 4 cylinder engine and the simulated sound is that of a 12 cylinder engine.
LCD display 38 shows which simulation sound is selected and menu up and down buttons 58 and 60 are provided for selecting desired simulation.
Figures 9 to 16 are detailed circuit diagrams for one circuit implementation of the simulator 2. Basically, Figures 9 to 16 are parts of a single circuit implementation. Generally speaking, Figures 9, 10 and 11 should be joined in side by side relation to show part of the overall circuit. Figures 12 and 13 again should be placed side by side to show another part of the circuit, which receives inputs from the circuitry shown in Figure 11 and Figure 15, as labelled. The operation of this circuit will be apparent to persons skilled in the art and therefore it is unnecessary to describe its operation in detail. It will be seen that the CPU 20 comprises a Z80 SI 80 chip which is clocked at say 24MHz or 33MHz. As shown in Figure
10, the memory 18 is in three parts, an EPROM 60, EEPROM 62 and SRAM 64. The
EPROM 60 stores the operating program for the CPU 20. The EEPROM 62 stores sound data in the circuit realisation shown a single EEPROM or double EEPROM 62 is used which would be appropriate for storage of sound samples for a single engine with 16 different
frequency signals being stored for each of three modes: cruise, acceleration and deceleration. If the system is to store corresponding sounds for other engines, then additional EEPROM 's would need to be included in the circuit. The SRAM 64 is for more limited but faster temporary storage of program instructions and sound data. Communications between the CPU 20 and the memories and other digital parts of the circuit is via an address bus 66 and a data bus 68. As shown in Figure 14, the circuit includes a data input jack 70 which is coupled to an RS 232 port 72 which serves as an interface for storing new sounds in the EEPROM 62 via the CPU 20. As shown in Figure 10, the circuit further includes an interface circuit 74 which serves as an interface between the panel switches 36 and the CPU 20. The circuit also includes an interface circuit 76 which serves as an interface between the CPU 20 and the selector switches for switching between operation of the simulator, special effects button and normal CD/radio operation. Associated with the memories are control switches 78 which are used to control read/ write operations for the EEPROM 62 and SRAM 64. The circuit further includes address decoders 80 and 82 for the memories, as shown in Figure 10.
Referring now to Figure 11 , it will be seen that the digital to analog converter 32 comprises separate digital to analog circuits 84 and 86 for left and right channels. Similarly, the second digital to analog converter 34 for the special effects comprises separate digital to analog circuits 88 and 90 for left and right channels as shown in Figure 15. The circuit includes address decoders 92 and 94 which are coupled between the address bus 66 and the circuits 84 and 86 for address decoding for the digital to analog converters as shown in Figures 11 and 15. Left and right analog output signals appear on the output lines 96 and 98 for the simulated engine sound signals. Analog output signals appear on the output lines 100 and 102 for the special effects signals as shown in Figure 15. The circuit may include an amplitude control circuit 104 which operates to vary the amplitude of output signals from the digital to analog circuits 84 and 86 as shown in Figure 11. The circuit 104 receives input on the data bus 68 from the CPU and its output line 105 is coupled to reference inputs of the circuits 84 and 86 as shown. The circuit 104 provides for the facility of having variations in sound amplitude according to engine RPM. For instance, at idle or low RPM's the sound level is relatively low and the amplitude is arranged to increase as the RPM rate increases.
Referring now to Figure 12, it will be seen that the outputs 96, 98, 100, 102 from the digital to analog converters are coupled to inputs of respective buffer amplifiers 106, 108, 110, 112 and 118, the outputs of which are connected to a bank of switches 114 which are controlled by the selector switch controller 76. As shown in Figure 13, outputs from the switch bank 114 are connected to a stereo base control circuit 116, the outputs of which are connected to the mixer 14. In the illustrated circuit, the mixer 14 is a multichannel mixer for providing separate front and rear stereo signals in the event that the automobile has front and rear speakers. As shown in Figures 12 and 13, the circuit also includes switch banks 118 and 120 for controlling special effects inputs to the multichannel mixer 14 and CD/radio input to the mixer 14 respectively. Outputs from the multichannel mixer 14 are connected to output terminals 33 which, in the illustrated arrangement, comprise front left and right jacks 122 and 124 and rear left and right jacks 126 and 128. Figure 16 shows one circuit realisation for the front panel switches 38 and the LCD array 38.
Figure 17 diagrammatically illustrates the main functions carried out by the simulator circuit 2 during its normal running condition. When the circuit is on, the CPU 20 scans the front panel switches 38 to detect any change, as indicated by step 130. If the user selects a particular sound to be simulated, the appropriate front panel switch will be operated and this is indicated by step 132. The CPU then enters a wait state as indicated by step 134. The CPU then loads the appropriate program from the EPROM 60 into the SRAM 64, as indicated by step 136. Then the CPU loads appropriate data from the EEPROM 62 into the SRAM 64, as indicated by step 138. This enables high speed operation of the CPU 20, as indicated by step 140. The CPU then checks the engine, as indicated by step 142, by reference to the output 29 of the voltage to frequency converter 28. In step 144 the CPU decides if there has been such a change in the rate of change of engine RPM that a new sound sample group needs to be chosen. As indicated above, the CPU determines the appropriate sound sample group by determining the rate of change in RPM. At a rate of change greater than 500 RPM per second in a positive direction the acceleration sound sample group will be chosen. At a rate of change greater than 300 RPM per second in a negative direction the deceleration sound sample group will be chosen. If no, the CPU determines whether the RPM has reached the RPM threshold
of the sample used and therefore needs to select a new RPM sample from the sound sample group in which it is operating, as shown in step 146.
If no, the CPU adjusts the digital to analogue converter update rate to equate engine RPM, as indicated by step 150. The CPU then updates the digital to analogue converter with sound data, as indicated by step 152. The digital to analog converter output signal is then fed to the analog filter mixer circuit as indicated by step 154.
If the CPU in step 144 detects a change in the rate of change of engine RPM, such that a different group of sound samples needs to be selected, then it does so as indicated by step 148.
If in step 146 the CPU determines that the engine RPM has reached the upper or lower threshold of the RPM sample last used then a new sample from the group will be selected as shown in step 149.
The sound generating equipment of the invention has been described with reference to its use in audio systems for vehicles. The principles of the invention could, however, be used in other applications such as various types of simulated vehicles or aircraft in which it is desirable to include as accurately as possible, noise signals corresponding to actual operating conditions. In these applications the noise generated could simulate engine noise or vehicle noise corresponding to a predetermined rate of operation of the engine or velocity of the vehicle or aircraft. A further application would be in computer controlled games where an authentic sound would be produced to correspond to the simulated engine rate or velocity of a vehicle or aircraft.
Many modifications will be apparent to those skilled in the art without departing from the spirit and scope of the invention.