Received: from PCH.mit.edu (18.7.21.50) by mail.efplus.com (192.168.0.8) with Microsoft SMTP Server (TLS) id 8.3.485.1; Thu, 19 Mar 2020 07:26:48 -0700 Received: from PCH.MIT.EDU (localhost.localdomain [127.0.0.1]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 02JEHEho011849; Thu, 19 Mar 2020 10:17:23 -0400 Received: from outgoing-exchange-5.mit.edu (OUTGOING-EXCHANGE-5.MIT.EDU [18.9.28.59]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 02JEHCjo011846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 19 Mar 2020 10:17:12 -0400 Received: from w92exedge3.exchange.mit.edu (W92EXEDGE3.EXCHANGE.MIT.EDU [18.7.73.15]) by outgoing-exchange-5.mit.edu (8.14.7/8.12.4) with ESMTP id 02JEHDRQ030289 for ; Thu, 19 Mar 2020 10:17:17 -0400 Received: from oc11expo15.exchange.mit.edu (18.9.4.20) by w92exedge3.exchange.mit.edu (18.7.73.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 19 Mar 2020 10:16:42 -0400 Received: from oc11exhyb6.exchange.mit.edu (18.9.1.111) by oc11expo15.exchange.mit.edu (18.9.4.20) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Thu, 19 Mar 2020 10:16:55 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104) by oc11exhyb6.exchange.mit.edu (18.9.1.111) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Thu, 19 Mar 2020 10:16:55 -0400 Received: from CO1PR15CA0044.namprd15.prod.outlook.com (2603:10b6:101:1f::12) by DM6PR01MB3628.prod.exchangelabs.com (2603:10b6:5:81::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.22; Thu, 19 Mar 2020 14:16:53 +0000 Received: from CO1NAM03FT051.eop-NAM03.prod.protection.outlook.com (2603:10b6:101:1f:cafe::c5) by CO1PR15CA0044.outlook.office365.com (2603:10b6:101:1f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.15 via Frontend Transport; Thu, 19 Mar 2020 14:16:53 +0000 Received: from premium47-4.web-hosting.com (68.65.123.244) by CO1NAM03FT051.mail.protection.outlook.com (10.152.80.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13 via Frontend Transport; Thu, 19 Mar 2020 14:16:53 +0000 Received: from 072-238-001-037.res.spectrum.com ([72.238.1.37]:50199 helo=[192.168.10.107]) by premium47.web-hosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1jEvyY-002hkb-Id; Thu, 19 Mar 2020 10:16:52 -0400 From: Neil To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Thu, 19 Mar 2020 07:16:45 -0700 Subject: Re: [EE] Measuring speaker impedance Thread-Topic: [EE] Measuring speaker impedance Thread-Index: AdX9+m0PXxsL/hXHRU2x7q2PBkQNVw== Message-ID: <5E737ECD.1030307@narwani.org> References: <5E72FCDA.8020300@narwani.org> <20200319051654.GJ7503@laptop.org> List-Help: List-Subscribe: , List-Unsubscribe: , In-Reply-To: Reply-To: Microcontroller discussion list - Public. Accept-Language: en-US X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Exchange-Organization-AuthSource: TS500.efplus4.local X-MS-Has-Attach: X-Auto-Response-Suppress: All X-MS-Exchange-Organization-SenderIdResult: TempError X-MS-Exchange-Organization-PRD: mit.edu X-MS-TNEF-Correlator: received-spf: None (protection.outlook.com: narwani.org does not designate permitted sender hosts) dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=narwani.org ; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:Reply-To:To:References:Subject:Sender:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zz0MbZzQcMCGGueNwexFYeg0e3wwzlQGA+tXGD6+sUQ=; b=wbaOKr/oZ0BYkgEhUqmk5GJby3 E6WrkesJYE2If0hKBWUE0XjMi5KpD29jtofyW+4NNkcrb61jTf6WUt+1YGh0f//T9MoSLKrVrCIDH Xyal1VowSAPhq5AE42LYnPFED55X725u7X7rdiaTOEWa90ZghkL351aBpbmILcy9XjdWZLzlMoflb oWdgxIVAYQRJ+rf4JyvucIsJDdoO/jPRSFQHBUes9cITfSWp6NSAbnypKPESr8keVJPdC9np2Mru/ HNi8j274X4CkJw7sLVEnf9b+VIppBRIk0s4xoVaVw0bmAArbbjtuR/YKMQTFmtJyhxIRh2JlpiA4P mG4Pqp/A==; authentication-results: spf=none (sender IP is 68.65.123.244) smtp.mailfrom=narwani.org; mit.edu; dkim=pass (signature was verified) header.d=narwani.org;mit.edu; dmarc=bestguesspass action=none header.from=narwani.org;compauth=pass reason=109 user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 errors-to: piclist-bounces@mit.edu list-id: "Microcontroller discussion list - Public." list-post: x-beenthere: piclist@mit.edu x-mailman-version: 2.1.6 x-source-args: x-source-dir: x-antiabuse: Sender Address Domain - narwani.org x-source: x-authenticated-sender: premium47.web-hosting.com: ca4@narwani.org x-topics: [EE] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 On 3/19/2020 3:39 AM, Sean Breheny wrote: > As James says, there are some problems with this, but I think it could be > done. > > What you have to realize, though, is that the whole concept of impedance = is > a small-signal one. A speaker only has a well-defined impedance for a fix= ed > frequency and a small amplitude of signal. Stray capacitance and the > effects of air on the cone will cause the impedance to vary with frequenc= y. > Even at a fixed frequency, the speaker is fundamentally a non-linear devi= ce > and so the impedance will change with amplitude and even during each cycl= e. Didn't realize that amplitude would change impedance. Need to research=20 that more. > However, I suspect that you could make a mathematical model of the speake= r, > including some of the non-linear effects, and then apply the audio signal > to both the speaker AND (virtually, in software) to your model. You would > then compare the predicted current (from the model) with the measured, > actual current, and adjust the model parameters until they match within > some tolerance. This setup is known as an "observer" because it ends up > "observing" the hidden parameters of the model based on a history of the > model behavior versus the real system behavior. > > Once you had your model,. you could then compute an estimated small-signa= l > impedance for any given frequency. > > One open question is whether all of the relevant model parameters are > observable from the data available to you (applied voltage and measured > current). I suspect that they are as long as the music contains a wide > enough frequency and amplitude content. > > This would be a moderately-challenging DSP project. I've done similar > things with electric motors (estimate parameters while the motor is > running). For some parameters, it took only a few days to get things to > work. For others it took months to make it work. Wow... a lot more involved that I imagined. The concern now (other than=20 the significant effort here) is that he tinkers with car audio a lot and=20 always changing things, so he wants to be able to swap speakers and have=20 this device show him impedance curves, and modeling each speaker is not=20 going simple for him to do. And there will be many other speakers in=20 the car, which I expect will need to be disconnected. > > Sean > > > On Thu, Mar 19, 2020 at 1:17 AM James Cameron wrote: > >> Problem foreseen is that the impedance you measure will then depend on >> a set of simultaneous frequencies rather than a signal of just one >> frequency, so using the impedance meaningfully is limited. >> >> The other thing is that the starting position of the cone would >> matter; a low frequency signal within the mix of signals could cause >> the cone to be in a position that may beat with the sampling. So >> despite doing it rapidly you could have the low frequency signal >> imposed on the results. >> >> On Thu, Mar 19, 2020 at 01:02:18AM -0400, Neil wrote: >>> Hi, >>> >>> I'm working on a project for a friend, which will measure speaker >>> impedance over a given frequency range. I'm thinking I'd use a functio= n >>> generator sweeping across frequency range, then measure current (prob >>> with a clamp sensor) and voltage across the speaker and do the math fro= m >>> there. No prob so far. >>> >>> But can how about doing this dynamically? IE: play music and >>> dynamically figure out speaker impedance from there. He believes >>> commercial devices do this. So far, all I can think of is measuring th= e >>> voltage and current as before, but dynamically FFT-ing both and >>> (rapidly) doing the math from there. Does this seem workable? >>> >>> Cheers, >>> -Neil. >>> >>> >>> -- >>> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive >>> View/change your membership options at >>> http://mailman.mit.edu/mailman/listinfo/piclist >> -- >> James Cameron >> http://quozl.netrek.org/ >> -- >> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .