CAREER implemented in hardware using a VHDL
CAREER EPISODE – 1 CHRONOLOGY: ProjectTitle: Digital Compensationof Distortion in Audio SystemsLocation: Department of Electrical Engineering,Linkoping University, SwedenProjectSupervisor: KentPalmkvist, Pär Gunnars Risberg CE1.1INTRODUCTIONAudio systems are usually found to cost an exorbitant amount, andwhile cheaper loudspeakers and other audio systems are alternatives, they donot provide the best quality. The accuracy of these less costly systems can beimproved by using real-time compensation, thus reducing the need for priceysystems. The availability of hardware that can digitally compensate forloudspeaker distortion and other characteristics, enables this. CE1.
2 NATURE OF THE PROJECTThe nature ofthis project is investigatory since our main purpose is to thoroughly examine themethods of digital compensation and evaluate all the available techniques ofreducing distortion in audio systems. Since distortions can cause the overallperformance of a loudspeaker to deteriorate, it is extremely necessary toinvest in new methods that can eliminate these unwanted effects such as distortionsand phase delays. In addition, louder bass sounds require more energy to beexpended but the precision of audio systems gets downgraded significantly indoing so. This is the main issue that needs to be considered during thisproject. CE1.3 OBJECTIVEThe mainobjective of this project was to eradicate distortions and other harmful consequencesof loudspeakers and amplifiers by using digital compensation methods and therebyresulting in improved performance. This project was performed to acquire moreinformation about distortions, which caused by a high input volume so that variousmethods can be developed for detecting it and consequently, compensating for it.
The major goal was to implement a fully working model that could be implementedin hardware using a VHDL (VHSIC Hardware Description Language) module so that highvolume input sequences could be operated on. Such a system would result in themodification of only those portions of the signal that cause distortions,resulting in enhanced performance and accuracy while playing bass at a loudvolume. CE1.4 TEAM CONTRIBUTIONAll tasks associatedwith the project were performed at Actiwave AB. These tasks were dividedamongst the team and include: · Detailedexamination of the audio system to find out how a too high input signal causingperceptible distortions can be detected digitally.· Construct a modelto discover and compensate for distortions and understand how the model workson removing them.
· Realize thedeveloped model into a real-world, working hardware system that is consistentwith processing time and other hardware limitations.· Compare thecompensated data with the original distorted data and evaluate how well thesystem performs. CE1.
5 ORGANISATIONAL STRUCTURE CHARTThis projectwas performed by a two-member team and we were responsible for performing the differentactivities required to complete the project. All the activities were overseen atActiwave AB by Pär Gunnars Risberg, who provided us with all the necessary equipmentand resources while the experiment was being carried out. Our supervisor at theuniversity, Kent Palmkvistr reviewed each stage of the project and ensured thatall the required tasks were performed as per planned. Uponcompletion of the project, the final report was compiled which was reviewed by oursupervisor, who then submitted it to the Head of the Department.
The report wasthen forwarded to the Education Council and Research Council for recordmanagement. FIGURE 1: ORGANISATIONAL CHART CE1.6 PERSONAL ENGINEERING ACTIVITYIn this project, I wasresponsible for carrying out the different examinations required to ascertain thecause of distortions that can be heard in loudspeakers and other audio systemscaused by a high input signal.
This process consisted of several steps: AudioSequence AnalysisA small and reverberant room wasused in this experiment for playing, recording and studying an audio sequence tofind hints of distortion. A loudspeaker and amplifier were used and thesequence was played at such a volume that the effects of the distortions couldbe heard unmistakably. Certain obvious differences were observed upon comparingthe played audio sequence with the recorded one, mostly because the recordedsignal consists of the impulse responses of the room as well as that of theaudio equipment, which affects the resulting wave of the signal.
The distortionalso causes higher frequencies to be added to the played sequence, however,this data is not enough to provide a solid insight into the divergence of theplayed signal from the recorded signal or to lead to any kind of conclusionsabout the presence of distortions in the signal. Identifyingthe Cause of DistortionI replayed the recorded signal usinga loudspeaker and amplifier and an electronic test instrument called anoscilloscope, was linked to the input of the loudspeaker to allow for aninspection of altering signal voltages as a two-dimensional graph of thesignal(s). The distortion was seen to overlap with the output voltage of the amplifier,thereby clipping the signal. It can thus be presumed that the incapability ofthe loudspeaker to imitate high input signals does not cause distortions,instead, the reason behind it is the failure of the amplifier to generate thecorrect signals and forward them to the loudspeaker. I then exchanged this analogueamplifier for another one that was produced by Actiwave themselves since they areclass-D amplifiers. The test was repeated with this amplifier, however, theresults observed did not change. Designof ModelA model was constructed inSimulink to understand how the distortions affect the rest of the signal.
I performed two kinds of test, one tone and two-toneto identify the frequencies at which the distortion occurs and how saturationof the signal affects its magnitude. After conducting these tests, it wasobserved that the undesirable signals were occurring at a lower frequency thanthe original one. I also noticed that the distortion could be detected withoutmuch hassle by the human ear, whether it was caused by clipping of the signalor not. In order to maintain high precision and accuracy, distortion in theoriginal signal must be controlled and kept to the absolute minimum. IdentifyingCause of SaturationVoltage saturation can be causedby a number of different sources, ranging from the structure of the amplifier (class-Dor analogue) to the inadequacies of the amplifier. These reasons are analysedfurther by examining the relationship between frequency and voltage saturation.A bass driver test was performed where sine waves were applied at differentfrequencies and volumes and the minimum voltage for distortion that could beheard, as well as the maximum voltage for non-discernable distortion, wererecorded.
A loudspeaker, as well as an amplifier, were used, however, thetweeter was disconnected while recording the observations. The same test isthen repeated after connecting the tweeter. The results of this second test indicatethat the output voltage is restricted by a lower input voltage signal and sincedistortions couldn’t be heard when the tweeter wasn’t connected, the tweeteractually acts as the source which gives audible distortions.
ReducingDistortionFor this experiment, we areonly interested in the distortions caused by bass in audio systems, so Idecided to not study the distortion in the tweeter any further. The key toreducing distortion is in limiting the output voltage (to 22V) to make surethat the signal does not get clipped. One more method that could solve ourproblem is to limit the bass in those channels that replicate high frequencies. CE1.7SIMULATION OF WORKING MODELIn order to ensure that our originalinput signal does not get clipped, we decided to use a limiter to limit thevalues reaching the available channels.
The limiter is only applied at lowfrequencies since that’s where most of the distortion was found during ouranalysis. This was the basis for the proposed model of the solution that wasimplemented in Simulink. The limiter employed for this purpose has the followingcomponents or phases: · LP prefiltering, LP post-filtering and preserving fullfrequency signal: An LP filter must be connected to the audio system to ensure thatonly lower frequencies are used when limiting the bass, as well as removing perceptibleclipping sounds caused by amplitude changes.· Altering amplitude of the bass channel: Theamplitude of the bass channel is reduced using time multiplexing, scaling orFFT and notch filters.
After observing each method carefully, it was found thatscaling would work best for our required purpose.· Decision-making block: This block is responsible fordeciding whether the bass should be limited or not. CE1.8HARDWARE IMPLEMENTATIONThe model simulated in Simulinkwas implemented by us using preexisting VHDL modules.
This included adjusting thebiquad filter structure that had been provided to us by Actiwave so that itcould sequentially execute different sets of inputs using different filtercoefficients in the same hardware system. Scaling of the signal is done byusing an IP core multiplier and an FSM (Finite State Machine) and two frequencybands are added and then instantiated by an IP core adder. The constructedmodel accomplishes the completion of the following tasks: · Generation of a full range signal after applyinglimitation of input voltage so that this methodology using limiters can beimplemented in various kinds of audio systems, with loudspeakers and amplifiershaving distinct frequencies within which they operate.· Weaken or limit the bass wherever it is required toprevent distortion that can be heard and thus maintaining the accuracy and precisionof the sound.· Preventing any phase delays that can modify the detectedsignal.· Making sure that the developed system is capable ofbeing updated and modified, should the need arise.
CE1.10 COLLECTIONOF DATATo allow for comparison of measurementsfrom different loudspeakers, Total Harmonic Distortion (THD) measurements areusually taken at a certain Sound Pressure Level (SPL). These measures includethe THD of the amplifier as well as the distortion of the loudspeaker and theresults when the limiter is on or off can then be compared.
This is the maintest because with the limiter if it performs its required job and works properly,the signal should avoid being clipped and the output voltage would then be constrainedwithin a certain level. We made use of the freely available software ARTA,which is a collection of programs that facilitate the measurement and analysisof audio. The collected data shows that thelimiter employed in the model limits the input voltage values and by limitingthe output voltage, reduces the distortion produced. It was also observed that themeasured THD becomes constant once it crosses a pre-specified threshold point,thus averting clipping of the signal. CE1.
9CHALLENGES ENCOUNTEREDIt is difficult to recognizethe signs of distortion from the playback of a recording, hence we had to relyon human ears to pick up the distortion. The limitations of an amplifier cause saturationof the input voltage. The amplifier circuit may also be shut down as a consequenceof too much sinking from it. The limiter has to be positioned before the volumemultiplicator, the volume needs to be controlled. However, this can neither beimplemented in Simulink nor in the VHDL hardware model. This is because, inSimulink models, the simulations work at a fixed volume level and the limiterdoes not work in real-time. If we do not employ a limiter, onemight be able to increase the sound to as high a level as they want and acrackling sound will be produced due to amplified distortion, thus resulting indecreased precision and defeating the whole purpose of the experiment.
When alimiter is used, the unpleasant crackling can be avoided, however, the bass getsrestricted, meaning that the bass remains constant even when the volume isturned up. This limited output can displease the listeners. CE1.10 CONCLUSIONThe conclusions obtained fromconducting this experiment is that a real-time implementation of the simulationmodel described in the experiment can be created using low-cost hardwaremodules. This execution identifies the frequencies at which the bass produces distortionand performs functioning to compensate for it. The realised, operation modelimproved the accuracy and performance of the signal even when there was a veryhigh input voltage, i.e, the sound was being played at a loud volume.
It alsoensured that the hardware model was maintainable and effective. When a limiter wasused, the sounds from the loudspeaker seemed to be more controlled and all distortionand its unwanted effects were removed. CE1.11DOCUMENTATIONThe report for this project wascompiled by our two-member team by using various records created throughout theduration of the project. Each phase in the execution of the project involved makingnotes consisting of various analysis results, measured data or other relatedinformation.
Upon completion of the project, the final completed report wassubmitted by us to the Head of the Department. CE1.12SUMMARYWorkingon this project allowed me to discover various methods of experimentation andanalysis.
It also helped me strengthen my capabilities of performing tasks aspart of a group relying mainly on the division of responsibility to meet thedeadlines and to utilize available resources efficiently. I also learned how differenttechniques were judged in relation to our final end requirement and then theideal one was chosen based on how each of them fared in the comparison.