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 00:49:08 -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 02J7dZAS007275; Thu, 19 Mar 2020 03:39:59 -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 02J7dX84007272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 19 Mar 2020 03:39:33 -0400 Received: from w92exedge4.exchange.mit.edu (W92EXEDGE4.EXCHANGE.MIT.EDU [18.7.73.16]) by outgoing-exchange-5.mit.edu (8.14.7/8.12.4) with ESMTP id 02J7dUD9028528 for ; Thu, 19 Mar 2020 03:39:38 -0400 Received: from oc11expo18.exchange.mit.edu (18.9.4.49) by w92exedge4.exchange.mit.edu (18.7.73.16) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 19 Mar 2020 03:37:09 -0400 Received: from oc11exhyb7.exchange.mit.edu (18.9.1.112) by oc11expo18.exchange.mit.edu (18.9.4.49) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Thu, 19 Mar 2020 03:39:25 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by oc11exhyb7.exchange.mit.edu (18.9.1.112) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Thu, 19 Mar 2020 03:39:24 -0400 Received: from DM3PR14CA0147.namprd14.prod.outlook.com (2603:10b6:0:53::31) by CY4PR01MB2358.prod.exchangelabs.com (2603:10b6:903:6c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.14; Thu, 19 Mar 2020 07:39:22 +0000 Received: from DM3NAM03FT013.eop-NAM03.prod.protection.outlook.com (2603:10b6:0:53:cafe::c1) by DM3PR14CA0147.outlook.office365.com (2603:10b6:0:53::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Thu, 19 Mar 2020 07:39:22 +0000 Received: from mail-ed1-f51.google.com (209.85.208.51) by DM3NAM03FT013.mail.protection.outlook.com (10.152.82.79) 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 07:39:22 +0000 Received: by mail-ed1-f51.google.com with SMTP id b23so1417567edx.4 for ; Thu, 19 Mar 2020 00:39:21 -0700 (PDT) From: Sean Breheny To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Thu, 19 Mar 2020 00:39:09 -0700 Subject: Re: [EE] Measuring speaker impedance Thread-Topic: [EE] Measuring speaker impedance Thread-Index: AdX9wt+PMxNrRe1pSx61CkNbWW4HYQ== Message-ID: References: <5E72FCDA.8020300@narwani.org> <20200319051654.GJ7503@laptop.org> List-Help: List-Subscribe: , List-Unsubscribe: , In-Reply-To: <20200319051654.GJ7503@laptop.org> 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: Pass X-MS-Exchange-Organization-PRD: mit.edu X-MS-TNEF-Correlator: received-spf: Pass (protection.outlook.com: domain of gmail.com designates 209.85.208.51 as permitted sender) receiver=protection.outlook.com; client-ip=209.85.208.51; helo=mail-ed1-f51.google.com; dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=g.20171207; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=MFkeWhxBLwOUh75kkQjLA/WtJ8vg3Mu8MFYb0sxcvIo=; b=cl7Hn7NGkEoHuHJIX/597LqWyiO12b+iWjvsodU77dT6AHqf3qwBTuNviDYGIFYZRE Iqc3AG6SQ7UwSBiehmJtmhr6eNBBnNV1Z03+Px87DPGSoXq5iewFVBcpGZQqIHPPKfGX cie6sa0dkpVP/UTDN/NL1AmAd39Tkty1UjxrrviNxvYEM/H3Rv/QioNVlkbO3EKh0s4Q TjmDXniZoGe0n+vTEQhI47nIN/isd7UwW4C1JXbTvNEBGSi4LyMRnnaLMHJoUjjRmgBY WZy3vclUVGQFqmjDc0nZ/AX7Ka01aBUr3dDNkN4AIUpyyk+C0f/9CKjvf2vwUFR+krf7 7OkA== authentication-results: spf=pass (sender IP is 209.85.208.51) smtp.mailfrom=gmail.com; mit.edu; dkim=pass (signature was verified) header.d=cornell.edu;mit.edu; dmarc=pass action=none header.from=cornell.edu;compauth=pass reason=100 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-received: by 2002:a17:906:1e4a:: with SMTP id i10mr353571ejj.169.1584603560488; Thu, 19 Mar 2020 00:39:20 -0700 (PDT) x-topics: [EE] x-content-filtered-by: Mailman/MimeDel 2.1.6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 fixed frequency and a small amplitude of signal. Stray capacitance and the effects of air on the cone will cause the impedance to vary with frequency. Even at a fixed frequency, the speaker is fundamentally a non-linear device and so the impedance will change with amplitude and even during each cycle. However, I suspect that you could make a mathematical model of the speaker, 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-signal 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. 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 .