Month: June 2024
Average Calculation and Array in For Loop
I collected two data sets. Data 1 collected a data point every 0.01 seconds, while Data 2 collected a data point every 1 min. They were taken at the same time, so they will have the same time stamps.
What I wanted to do was to average all the values of Data 1 for every minute, so that I will end up with the same amount of data points as Data2. I was thinking of using a for loop top iterate through every element of data1. Then, check if the minute of element i is the ssme as the minute of the previous element i-1. If so, I added the two numbers into a variable x and increased the count by count = count + 1. This went one until a new minute was reached. Then, the average of all previous elements (corresponding to the "old" minute) would be calculated by x/count. Then, this value would be appended into a new array called averages. Finally, for the new minute, the sum x would be resetted by x = data1(i) and the count would also be resetted to 1.
The code is attached below. However, when I run it it gives me the error: Error using count. Not enough input arguments. Error in plots_data (line 31): average = x / count; What is wrong?
for i = 1:length(data1)
% Check if the minute of the current data point is the same as the previous one
if i > 1 && m(i) == m(i-1) % m are the minutes
% If it is, accumulate the thrust value and increase the count
x = x + data1(i);
count = count + i;
else
% If it’s a new minute, calculate the average thrust for the previous minute
average = x / count;
averages = [averages; average];
% Reset sum and count for the new minute
x = data1(i);
count = 1;
end
endI collected two data sets. Data 1 collected a data point every 0.01 seconds, while Data 2 collected a data point every 1 min. They were taken at the same time, so they will have the same time stamps.
What I wanted to do was to average all the values of Data 1 for every minute, so that I will end up with the same amount of data points as Data2. I was thinking of using a for loop top iterate through every element of data1. Then, check if the minute of element i is the ssme as the minute of the previous element i-1. If so, I added the two numbers into a variable x and increased the count by count = count + 1. This went one until a new minute was reached. Then, the average of all previous elements (corresponding to the "old" minute) would be calculated by x/count. Then, this value would be appended into a new array called averages. Finally, for the new minute, the sum x would be resetted by x = data1(i) and the count would also be resetted to 1.
The code is attached below. However, when I run it it gives me the error: Error using count. Not enough input arguments. Error in plots_data (line 31): average = x / count; What is wrong?
for i = 1:length(data1)
% Check if the minute of the current data point is the same as the previous one
if i > 1 && m(i) == m(i-1) % m are the minutes
% If it is, accumulate the thrust value and increase the count
x = x + data1(i);
count = count + i;
else
% If it’s a new minute, calculate the average thrust for the previous minute
average = x / count;
averages = [averages; average];
% Reset sum and count for the new minute
x = data1(i);
count = 1;
end
end I collected two data sets. Data 1 collected a data point every 0.01 seconds, while Data 2 collected a data point every 1 min. They were taken at the same time, so they will have the same time stamps.
What I wanted to do was to average all the values of Data 1 for every minute, so that I will end up with the same amount of data points as Data2. I was thinking of using a for loop top iterate through every element of data1. Then, check if the minute of element i is the ssme as the minute of the previous element i-1. If so, I added the two numbers into a variable x and increased the count by count = count + 1. This went one until a new minute was reached. Then, the average of all previous elements (corresponding to the "old" minute) would be calculated by x/count. Then, this value would be appended into a new array called averages. Finally, for the new minute, the sum x would be resetted by x = data1(i) and the count would also be resetted to 1.
The code is attached below. However, when I run it it gives me the error: Error using count. Not enough input arguments. Error in plots_data (line 31): average = x / count; What is wrong?
for i = 1:length(data1)
% Check if the minute of the current data point is the same as the previous one
if i > 1 && m(i) == m(i-1) % m are the minutes
% If it is, accumulate the thrust value and increase the count
x = x + data1(i);
count = count + i;
else
% If it’s a new minute, calculate the average thrust for the previous minute
average = x / count;
averages = [averages; average];
% Reset sum and count for the new minute
x = data1(i);
count = 1;
end
end array MATLAB Answers — New Questions
convert one fixed point format to integer
I have a variable that varies from 0 to 1 and its format is 32 bit fixdt(1,32,30). I want to convert this number 0 to 1 as 0-4095. Help is required for converting fixdt(1,32,30) to 12 bits integer value ranging from 0 to 4095.I have a variable that varies from 0 to 1 and its format is 32 bit fixdt(1,32,30). I want to convert this number 0 to 1 as 0-4095. Help is required for converting fixdt(1,32,30) to 12 bits integer value ranging from 0 to 4095. I have a variable that varies from 0 to 1 and its format is 32 bit fixdt(1,32,30). I want to convert this number 0 to 1 as 0-4095. Help is required for converting fixdt(1,32,30) to 12 bits integer value ranging from 0 to 4095. data type conversion MATLAB Answers — New Questions
Accessing Copilot for Microsoft 365: A Comprehensive Guide
[New Blog post]
In this article we explain the path for the adoption of #MSCopilot and its advantages. Learn what Copilot is and how you can train yourself and your employees accordingly.
https://www.msb365.blog/?p=5614
#MSLearn #MVPbuzz #M365 #Copilot
[New Blog post]
In this article we explain the path for the adoption of #MSCopilot and its advantages. Learn what Copilot is and how you can train yourself and your employees accordingly.
https://www.msb365.blog/?p=5614
#MSLearn #MVPbuzz #M365 #Copilot
VBA disabled in Excel
This morning VBA was not available – Error during initializing the VBA libraries (1004).
Any suggestion to resolve this
This morning VBA was not available – Error during initializing the VBA libraries (1004).Any suggestion to resolve this Read More
Preparing for Insider Preview Builds of Windows 11
I’m trying to prepare my Windows 10 system for the upcoming Insider Preview builds of Windows 11. However, I’m not sure what steps I need to take to prepare my system for the transition. I’ve tried searching for guidance online, but I’m not finding any clear information on what specific settings or configurations I need to change.
Can anyone provide a step-by-step guide on how to prepare my Windows 10 system for the Insider Preview builds of Windows 11? Are there any specific settings or configurations that I need to adjust, such as drivers or software updates? Are there any potential issues or risks that I should be aware of when making the transition?
I’m trying to prepare my Windows 10 system for the upcoming Insider Preview builds of Windows 11. However, I’m not sure what steps I need to take to prepare my system for the transition. I’ve tried searching for guidance online, but I’m not finding any clear information on what specific settings or configurations I need to change. Can anyone provide a step-by-step guide on how to prepare my Windows 10 system for the Insider Preview builds of Windows 11? Are there any specific settings or configurations that I need to adjust, such as drivers or software updates? Are there any potential issues or risks that I should be aware of when making the transition? Read More
Collaboration of 100+ Communities at Global Azure 2024
The annual Global Azure event, where Microsoft Azure communities worldwide gather to learn about Azure and AI, was held again this year as Global Azure 2024 on April 20. Microsoft MVPs, Regional Directors, Microsoft Learn Student Ambassadors, and community leaders came together, organizing events in 105 cities across 101 communities, creating a new chapter in Global Azure history.
This blog post showcases some local events as well as features reflections from the Global Azure Admin Team, who contributed to the event’s success.
Global Azure Skopje 2024 in Skopje, Macedonia
In Skopje, Macedonia’s capital, two local communities, the Macedonian .Net Community and the Macedonian IT Pro User Group, collaborated to host Global Azure Skopje 2024. Held at the InnoX Innovation Center of Skopje, run by International Balkan University, this event saw 170 participants gather to learn about the latest technology.
Details about the sessions, speakers, and the enthusiastic atmosphere are available in the event report by media partner ITuziast, titled “Global Azure Skopje 2024: A Pivotal Event for Tech Enthusiasts and Professionals.” Additionally, you can find numerous event photos on the Global Azure website. Check out the link to experience the event’s vibe: Global Azure Macedonia – Global Azure 2024
Global Azure Local Event in Amsterdam, Netherlands
In Amsterdam, the dotnet.Amsterdam community (LinkedIn / meetup.com) hosted a local Global Azure event. Three speakers presented sessions on Microsoft Entra External ID, Microsoft Semantic Kernel Agents, and Azure Data API Builder, providing a unique learning opportunity for all attendees.
Information on the sessions, archive videos, speaker details, and event photos can be found on the Global Azure page dotnet.Amsterdam – Global Azure 2024 and the community’s YouTube channel dotnet.amsterdam: tech community event recordings – YouTube.
Global Azure Spain in Madrid, Barcelona, and Zaragoza
Global Azure Spain was held in three cities: Barcelona on April 17, and Madrid and Zaragoza on April 20, attracting over 400 participants, more than double the previous year’s attendance.
The opening session featured Alberto Granados, President of Microsoft Spain, and Scott Hanselman, Developer Community VP at Microsoft Corporation, who kicked off the event. Over 50 experts shared the latest technological insights and experiences across more than 40 sessions. Detailed event reports and participant interactions can be viewed through the links below. Stay updated with the latest information on Global Azure Spain’s social channels:
Global Azure Spain – Global Azure 2024
Global Azure Spain: Overview | LinkedIn
Global Azure Spain (@GlobalAzureES) / X
Global Azure 2024 in Tokyo, Japan
The Japan Azure User Group (JAZUG) hosted the Tokyo edition of Global Azure 2024 at the Microsoft Japan office. Continuing as a hybrid event, over 80 participants attended in person, deepening their knowledge of the latest in Azure and AI through a two-track agenda.
An Azure MVP who organized the event, Yui Ashikaga, reflected on its significance: “The best part was creating an offline space for people who use Azure to communicate. Hearing stories of people who were thrilled to meet in person, having only interacted on social media, made me feel glad we hosted the event.”
Discussing differences from last year, Yui noted, “With more offline events being held recently, communication started at other events, leading to new speakers at Global Azure. This year, we had many new heroes.” He also highlighted the broader Azure community in Japan, “This year, we hosted Global Azure events in multiple cities like Hokkaido and Fukuoka, showcasing the growing enthusiasm for Microsoft Azure in Japan.”
Insights on Global Azure 2024 from the Global Azure Admin Team
Magnus Martensson (Azure MVP/RD) from the Global Azure Admin Team reflected on the event, saying, “Global Azure 2024 was a fun, happening, and successful event again this year. Lots of community hero-initiatives around the globe.”
After Global Azure 2024, organizers from various locations praised the event and the strong connections formed across local communities. Magnus says, “And then they enthusiastically proceed to tell the story about their event, what they did, who spoke, if they did a lab, who sponsored, what their venue was like, and what they ate. It is wonderful to see and hear these stories. I cannot give thanks enough, and never seize to be deeply impressed with the community spirit of the leadership in the local communities.”
When asked about the future evolution of Global Azure, Magnus emphasized updates to the website to foster organizer collaboration and a larger mission: “We want to empower every prospective community leader out there to do more!” He shared this vision of expanding his leadership experience to the next generation of community leaders, ” There are technical enthusiasts everywhere, and a work-life including community companionship is so rich and rewarding that we want everyone to know about this. The evolution of Global Azure includes guides, advice, and support for how to establish and grow communities anywhere! We are also adamant at spreading the word about community to young professionals. Why is community valuable to invest time in? We know. We live it. As a young professional it is not for certain that you have heard about this. Anything we can do to include the next generation of budding technical specialists, we will! This is a large part of our mission.”
Magnus concluded with a message for tech communities worldwide, encouraging continuous engagement with technology: “Keep adding value to the world of technology and enjoy getting down and geeky together with peers who think the same way and are excited about the same geeky tech. Learning together is the greatest force in work life and it brings the biggest rewards too! Anyone should feel free to reach out to us if they have questions or want to know about community life and get some advice on their own situation.”
Rik Hepworth, another Azure MVP/RD who co-led the event’s planning and management, shared his reflection, “We were very pleased with how some things went this year – whilst overall the number of events was the same as last year it was great to see more in the USA and Canada; there was a high level of interest from potential sponsors, and we had some great benefits for our attendees as a result. There continues to be wonderful variety in the types of events (from evening user groups to one day conferences, to the three-day hybrid juggernaut that David and his colleagues run in Spain), the content (IT/Ops, Dev, Data + AI, etc) and, importantly, diversity of organisers and contributors.”
Rik continues, “MVPs and RDs across the world continue to provide strong support and we thank them for that, but it is important to remember that this is not an MVP-exclusive event and there are many, many members of the community that give their time and energy to organising and speaking and we hope that our efforts help our community inspire the MVPs of the future.”
Rik and the Global Azure Admin Team is working for wrapping up of this year’s event and insights about the next one, “As a team we are now reviewing this years’ event as we begin to put together our whitepaper, as well as looking forward to 2025!”
The Community Ecosystem Shining at Global Azure
A Community Program Manager in Japan and an event sponsor in Tokyo, Rie Moriguchi (it’s me), noticed more diverse attendees compared to last year and a significant change in the participants, speakers, and staff. Participants who learned from the event last year became speakers and staff this year, showcasing a healthy cycle of learning and sharing knowledge within the community. One of the former participants even returned as a Microsoft MVP speaker, sharing his insights.
Events like Global Azure provide opportunities to learn new knowledge and become new community heroes. We look forward to seeing many new community leaders emerge from participants worldwide and eventually welcome them as Microsoft MVPs in the future.
In closing, we extend gratitude and praise to the Global Azure Admin Team, event organizers, speakers, and everyone involved in this opportunity who helped make this year’s Global Azure a success including participants who joined the events. Thank you for contributing to the growth and success of the global tech community!
Microsoft Tech Community – Latest Blogs –Read More
New Login Experience for Azure Subscriptions with az login
Introduction
If you have multiple Azure subscriptions, you might have experienced the frustration of logging into the wrong one with the az login command. This can cause errors and confusion when you try to run commands or access resources in the wrong subscription.
Fortunately, there is a new login experience that makes it easier to select the right subscription. This feature was announced at the Build 2024 conference and is available in version v2.61.0 of the Azure CLI.
How to use the new az login experience
To use the new login experience, you need to update your Azure CLI to the latest version. There are a few ways to do this as documented here: https://learn.microsoft.com/en-us/cli/azure/update-azure-cli. You can manually do this by running the command:
az upgrade
Once you have the latest version, you can run the az login command as usual. However, instead of logging into the default subscription, you will see a list of your available subscriptions and a prompt to choose one. For example:
You can hit enter and log into the default or enter the number of the subscription you want to log into. The subscription you choose will be set as the default for the current session. You can verify this by running the command:
az account show
If you want to switch to a different subscription, you can run the az login command again and choose another one. You can also use the az account set command with the subscription ID or name.
Benefits of the new az login experience
The new login experience has several benefits for Azure users who have multiple subscriptions:
Reduces Errors and Confusion: Minimizes the risk of logging into the wrong subscription.
Saves Time and Effort: Avoids the need to run additional commands to set or change the default subscription.
Improves User Experience: Provides an interactive and intuitive way to choose the subscription.
The new login experience for Azure subscriptions with az login is a welcome feature that makes it easier to work with multiple subscriptions.
For more information, visit Sign in with Azure CLI at a command line | Microsoft Learn
Microsoft Tech Community – Latest Blogs –Read More
How to detect the specific area from an oscilloscope signal
Hello,
I don’t have any experience with MATLAB or coding, therefore I ask you about the general idea and method so that I can solve that easier.
I have two types of patterns, as shown in the attachment, the first type has the unique signal before coming back to the noise level for 0.15-0.2s. While the second one has typically longer time,
Each type has about hundreds files of similar pattern. So how can I create a a program to detect if it is type 1 or type 2 when inserting a random file (.csv format) in 2 groups?Hello,
I don’t have any experience with MATLAB or coding, therefore I ask you about the general idea and method so that I can solve that easier.
I have two types of patterns, as shown in the attachment, the first type has the unique signal before coming back to the noise level for 0.15-0.2s. While the second one has typically longer time,
Each type has about hundreds files of similar pattern. So how can I create a a program to detect if it is type 1 or type 2 when inserting a random file (.csv format) in 2 groups? Hello,
I don’t have any experience with MATLAB or coding, therefore I ask you about the general idea and method so that I can solve that easier.
I have two types of patterns, as shown in the attachment, the first type has the unique signal before coming back to the noise level for 0.15-0.2s. While the second one has typically longer time,
Each type has about hundreds files of similar pattern. So how can I create a a program to detect if it is type 1 or type 2 when inserting a random file (.csv format) in 2 groups? triboelectric, plot, csv MATLAB Answers — New Questions
mex call with fftw_threads causes CRASH AFTER CLOSING MATLAB
strange behavior:
if I work in my matlab source with fft and ifft and then call in the same source my mex-function which works with fftw_threads and of course fftw,ifft, it works very good, but after closing matlab, I’ll get "Segmentation violation detected" with something like fftw_plan_awake….
If I do this process the other way around, first call of my mex function and afterwards fft,ifft in my matlab source, closing matlab, I have no "Segmentation violation detected".
As well, if I run my mex-function without fftw_threads everything is fine!! (irrelevant if I call matlab fft then mex fct or mex fct then matlab fft)
In both source, matlab and c-mex-source, I only make some easy standard fft, nothing special. New is the try to work with fftw_threads.
My Question: what happens in the background so that matlab crashes after closing in some constellations?
Thank you!strange behavior:
if I work in my matlab source with fft and ifft and then call in the same source my mex-function which works with fftw_threads and of course fftw,ifft, it works very good, but after closing matlab, I’ll get "Segmentation violation detected" with something like fftw_plan_awake….
If I do this process the other way around, first call of my mex function and afterwards fft,ifft in my matlab source, closing matlab, I have no "Segmentation violation detected".
As well, if I run my mex-function without fftw_threads everything is fine!! (irrelevant if I call matlab fft then mex fct or mex fct then matlab fft)
In both source, matlab and c-mex-source, I only make some easy standard fft, nothing special. New is the try to work with fftw_threads.
My Question: what happens in the background so that matlab crashes after closing in some constellations?
Thank you! strange behavior:
if I work in my matlab source with fft and ifft and then call in the same source my mex-function which works with fftw_threads and of course fftw,ifft, it works very good, but after closing matlab, I’ll get "Segmentation violation detected" with something like fftw_plan_awake….
If I do this process the other way around, first call of my mex function and afterwards fft,ifft in my matlab source, closing matlab, I have no "Segmentation violation detected".
As well, if I run my mex-function without fftw_threads everything is fine!! (irrelevant if I call matlab fft then mex fct or mex fct then matlab fft)
In both source, matlab and c-mex-source, I only make some easy standard fft, nothing special. New is the try to work with fftw_threads.
My Question: what happens in the background so that matlab crashes after closing in some constellations?
Thank you! mex fftw_threads, crash after closing matlab MATLAB Answers — New Questions
Import data from google sheets to matlab
Hello guys,
I wanted to import data from google sheets to matlab. However I couldn’t find any information about it. Since the google sheets always geting update I can’t just copy and paste so I wanted to import new data for every time I run the matlab script. Is there a way?
Thanks in advance.Hello guys,
I wanted to import data from google sheets to matlab. However I couldn’t find any information about it. Since the google sheets always geting update I can’t just copy and paste so I wanted to import new data for every time I run the matlab script. Is there a way?
Thanks in advance. Hello guys,
I wanted to import data from google sheets to matlab. However I couldn’t find any information about it. Since the google sheets always geting update I can’t just copy and paste so I wanted to import new data for every time I run the matlab script. Is there a way?
Thanks in advance. google sheets MATLAB Answers — New Questions
Ultimate Guide to POSETTE: An Event for Postgres, 2024 edition
Now in its 3rd year, POSETTE: An Event for Postgres 2024 is not only bigger than previous years but some of my Postgres friends who are speakers tell me the event is even better than past years. Sweet.
Formerly called Citus Con (yes, we did a rename), POSETTE is a free and virtual developer event happening Jun 11-13 that is chock-full of Postgres content—with 4 livestreams, 42 talks, and 44 speakers.
And while POSETTE is organized by the Postgres team here at Microsoft, there is a lot of PG community involvement. For example, 31 of the 44 speakers (~70%) are from outside Microsoft! We have also tried to be quite transparent about the talk selection process used for POSETTE 2024, if you’re curious.
On the schedule, the add to calendar links (in upper right of each livestream’s tab) are quite useful for blocking your calendar—and the calendar appointments include a link to where you can watch the livestreams on the POSETTE site.
So what exactly is on the schedule for POSETTE: An Event for Postgres 2024? A lot! When you look at the schedule page, be sure to check out all 4 tabs, so you don’t miss all the unique talks in Livestreams 2, 3, and 4.
There’s something “accessible” about virtual events
As much as many of us 🧡 in-person Postgres events—I just returned from PGConf.dev 2024 in Vancouver which was so much fun1—I am also a big fan of the accessibility of the virtual format.
Why? Because not everybody can travel to in-person conferences: Not everyone has the budget (or the time, or the schedule flexibility). So it’s rewarding to collaborate with all these knowledgeable speakers to produce video talks you can watch from the comfort of your very own desk. With espresso (or tea) in hand.
Speaking of accessibility, let’s talk captions. All the talk videos published on YouTube will have captions available in 14 languages. The POSETTE team QA’s and fixes the English captions first and then generates the translated captions based on the improved baseline version.
Captions available in 14 languages: Chinese Simplified, Chinese Traditional, Czech, English, French, German, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, and Turkish
So much gratitude for all these POSETTE speakers
The raison d’être for most conferences is to learn from each other—and in particular, to learn from the speakers. So before diving into this Ultimate Guide we want to say thank you to all of the amazing the speakers who have brought so much knowledge and enthusiasm to POSETTE this year.
TIP about Speaker Interviews: Some of the speakers submitted speaker interviews. So if you want to know more about these Postgres experts, just click on the links to their talks below and you’ll be taken to their speaker page, which includes the talk abstract, a link to the livestream schedule, links to any past POSETTE talks—plus the speaker interview, if they submitted one!
Gratitude for our Livestream hosts too
There is a fun lineup of Postgres people from inside and outside Microsoft to co-host the 4 livestreams, including Boriss Mejías, Claire Giordano (that’s me) Floor Drees, Jelte Fennema-Nio, Krishnakumar (KK) Ravi, Melanie Plageman, and Pino de Candia.
Big +1 to all these folks for volunteering their time and their commentary to hosting the livestreams.
How to watch the POSETTE livestreams?
Each of the 4 livestreams has its own Add to calendar link which should be easy to find on that Livestream’s tab on the POSETTE Schedule.
And when you use the Add to calendar links to block your calendar, the calendar invites include instructions on:
WHERE to watch the livestreams: POSETTE event homepage
TIP: be sure to reload the POSETTE homepage on the day of the event, so you’re not viewing some cached older version of the page or a replay of a previous livestream.
WHERE to check out the schedule = POSETTE schedule page
How to participate in the official back-channel for POSETTE?
WHERE to join the virtual hallway track = #posetteconf channel on the Microsoft Open Source Discord.
You can join the channel now, no need to wait, that way you’ll be all setup before the conference.
What’s the benefit to you of joining the virtual hallway track, also known as the “official back-channel”? Most of the speakers have signed up to be available on the virtual hallway track whilst their talks are being livestreamed. So it’s your opportunity to ask speakers questions—and to be part of the conversation, and make some Postgres friends.
Will the recordings be available after the event?
Yes! All the POSETTE talks will be published online on YouTube after the event is over, so you can watch all 42 talks at your convenience, on your own schedule—even at 2X speed. With captions available in at least 14 languages.
Still, we hope you join us during the actual livestreams to be part of the live text chat.
Now let’s explore the different categories of talks you’ll see at POSETTE: An Event for Postgres 2024.
4 amazing Keynotes, one for each livestream
Each of the 4 POSETTE livestreams has its own invited keynote. The keynote speakers were hand-selected and invited to come tell their story at POSETTE. We’re so happy they said yes—and that they will be sharing their open source, developer, cloud, and community experiences with us.
Livestream 1 Keynote by Charles Feddersen: All The Postgres Things at Microsoft, POSETTE edition
Livestream 2 Keynote by Regina Obe: The Open Source Geospatial Community, PostGIS, & Postgres
Livestream 3 Keynote by Sarah Novotny: Why I love open source development & what I learned from K8s
Livestream 4 Keynote by Thomas Munro: A Walking Tour of PostgreSQL
7 AI-related talks
With everything happening with pgvector and Postgres, it’s not a surprise that there was a plethora of AI talk submissions at this year’s POSETTE. In the end, we landed on 7 AI-related talks.
In alphabetical order by talk title:
6 things you can do with azure_ai & PostgreSQL on Azure, by Denzil Ribeiro (livestream 3, AI, azure_ai, AzureDBPostgres, Flexible Server, pgvector)
Advancing Drug Search with PostgreSQL and Azure AI, by Taras Kloba (livestream 4, ai, azure_ai, AzureDBPostgres, customer)
From Postgres full text search to Retrieval Augmented Generative search, by Adam Wølk (livestream 2, ai, AzureDBPostgres, rag)
pgvector for Python developers, by Pamela Fox (livestream 3, ai, ecosystem, pgvector, python, orm, psycopg, demo)
Postgres-powered AI: Running an End-to-End AI Platform with Postgres on Azure, by Jaehyun Sim of Ikigai Labs (livestream 1, ai, AzureDBPostgres, customer)
Semantic search with Django, PostgreSQL, & pgvector, by Paolo Melchiorre of 20tab (livestream 4, AI, django, ecosystem, pgvector, python)
Vector data in Postgres – how’s it different from “normal” data?, by Heikki Linnakangas of Neon (livestream 2, AI, data types, HNSW, postgres, pgvector)
15 Postgres core talks
Lots of Postgres goodness here. In alphabetical order by talk title:
Beyond Joins and Indexes, by Bruce Momjian of EDB (livestream 3, prolific presenter, query optimizer, tips)
Even JSONB In Postgres Needs Schemas, by Chris Ellis of Nexteam (livestream 2, customer, json, schemas)
Everything you need to know about Postgres Row Level Security, by Paul Copplestone of Supabase (livestream 1, security, startup)
Hazards of logical decoding in PostgreSQL, by Polina Bungina of Zalando SE (livestream 4, cdc, logical decoding)
How/Why to Sweep Async Tasks Under a Postgres Table, by Taylor Troesh (livestream 3, queues, Postgres as a platform)
Partitioning your Postgres tables for 20X better performance, by Derk van Veen of Adyen (livestream 4, customer, joins, partitioning, performance, tips)
Postgres Storytelling: What’s going on with Synchronous Replication?, by Boriss Mejías of EDB (livestream 2, Postgres storytelling, replication, WAL)
PostgreSQL Partitioning: Slicing and Dicing for Performance and Easier Maintenance, by Ryan Booz of Redgate (livestream 2, maintenance, partitioning, performance)
PostgreSQL performance tips you have never seen before V2.0, by Hans-Jürgen Schönig of CYBERTEC (livestream 4, performance, tips)
PostgreSQL physical replication – internals, latest development and opportunities, by Krishnakumar (KK) Ravi and Melih Mutlu (livestream 3, replication, WAL)
Revitalizing Outdated Data Models with PostgreSQL Views, by Newvick Lee of Careteam Technologies (livestream 3, data modeling, postgresql views)
Scaling the Wall of Text: Logging Best Practices in PostgreSQL, by Richard Yen of EDB (livestream 1, logging, performance, security, tips)
Tuning Parameters in Postgres vs. Tuning Your Queries, by Henrietta Dombrovskaya of DRW (livestream 1, performance, query tuning)
Where do the performance cliffs come from?, by Tomas Vondra of EDB (livestream 4, performance, performance cliffs, query optimizer)
You Don’t Need a Database Backup Policy, by Karen Jex of Crunchy Data (livestream 4, backups, disaster recovery, DR)
8 Postgres ecosystem talks
“Ecosystem” is the “E” in the middle of POSETTE. In alphabetical order by talk title:
Accelerating PL/pgSQL Code Conversion When Migrating to Postgres, by Deepak Mahto (livestream 2, pl/pgsql, migrations, Oracle to Postgres)
Comparing Postgres connection pooler support for prepared statements, by Jelte Fennema-Nio (livestream 1, connection poolers, pgbouncer, odyssey, pgcat, supavisor)
Data-intensive PostgreSQL: Three ways to scale, by Marco Slot of Crunchy Data (livestream 2, analytics, citus, extensions, it depends, performance, pg_partman, SaaS, scalability)
The Open Source Geospatial Community, PostGIS, & Postgres, by Regina Obe of Paragon Corporation and PostGIS PSC (livestream 2, community, geospatial, KEYNOTE, postgis)
Lessons Learned from benchmarking and profiling distributed PostgreSQL, by Lotte Felius, a PhD Student in the Database Architectures group at CWI (livestream 2, benchmarking, citus, extensions, performance, ycsb)
SaaS on Rails on PostgreSQL, by Andrew Atkinson, author of High Performance PostgreSQL for Rails (livestream 1, citus, extensions, multi-tenancy, rails, ruby, saas)
State of the Postgres Extension Ecosystem, by David Wheeler of Tembo (livestream 1, extensions, pgxn)
Vindicating ZFS with PostgreSQL: Unleashing the Power of Scalability, by Federico Campoli (livestream 4, file system, storage, zfs, zol)
8 Azure Database for PostgreSQL talks
All The Postgres Things at Microsoft, POSETTE edition, by Charles Feddersen (livestream 1, AzureDBPostgres, cloud, community, conferences, KEYNOTE, open source)
Autotuning PostgreSQL on Azure Flexible Server, by Luigi Nardi of DBtune (livestream 4, AzureDBPostgres, machine learning, performance, query tuning, self-driving database)
HA and DR at a glance with Azure Database for PostgreSQL, by Silvano Coriani (livestream 2, AzureDBPostgres, DR, HA, multi-region DR, PaaS)
Making Postgres inserts faster on Azure, by Gayathri Paderla (livestream 1, AzureDBPostgres, performance)
Tales from the Field – Oracle to PostgreSQL migrations, by Adithya Kumaranchath (livestream 3, migrations, Oracle to Postgres)
Using Azure Query Store to Understand PostgreSQL Performance, by Grant Fritchey of Redgate (livestream 3, AzureDBPostgres, performance, query store, query tuning)
What Enterprises like about Azure Database for PostgreSQL – Flexible Server, by Kanchan Bharati (livestream 1, AzureDBPostgres, cloud, enterprise)
What Makes Azure Database for PostgreSQL Great for Developers?, by Varun Dhawan (livestream 3, AzureDBPostgres, cloud, developers, extensions, ecosystem)
4 Postgres community talks
A Walking Tour of PostgreSQL, by Thomas Munro (livestream 4, community, KEYNOTE, open source, postgres history, postgres contributor story)
How to Work with Other People, by Jimmy Angelakos and Floor Drees (livestream 2, collaboration, community, neurodiversity, open source, people)
Open Source Contributions to Postgres: The Basics, by Elizabeth Christensen of Crunchy Data (livestream 1, contributing to postgres, community)
Why I love open source development & what I learned from K8s, by Sarah Novotny (livestream 3, collaboration, community, kubernetes, open source)
Please tell your friends & mark your calendars for this year’s POSETTE
If you are into PostgreSQL and into continuous learning, join us on Jun 11-13. No travel required.
Livestream 1: on Tue Jun 11 from 8:00am – 2:00pm PDT (UTC -7) with 11 unique talks (add to calendar / link to Livestream 1 schedule)
Livestream 2: on Wed Jun 12 from 8:00am – 2:00pm CEST (UTC +2) with 11 unique talks (add to calendar / link to Livestream 2 schedule)
Livestream 3: on Wed Jun 12 from 8:00am – 1:30pm PDT (UTC -7) with 10 unique talks (add to calendar / link to Livestream 3 schedule)
Livestream 4: on Thu Jun 13 from 8:00am – 1:30pm CEST (UTC +2) with 10 unique talks (add to calendar / link to Livestream 4 schedule)
Virtual hallway track is in the #posetteconf channel on the Microsoft Open Source Discord. You’re invited to pop in, say hello, and ask questions.
Opportunities for cool SWAG: There will be chances to snag sticker swag for those who join the livestreams—plus a cloud skills challenge for those who are into Azure Database for PostgreSQL.
And if you do the social media thing and want to help spread the word about the POSETTE livestreams to your friends and networks, you can follow @PosetteConf on X/Twitter to stay connected—or you can follow us on Mastodon or also on Threads.
Final thank you’s
And while this blog post has already thanked the 44 speakers and 7 livestream co-hosts, it’s time to thank everyone at Microsoft involved in organizing POSETTE 2024 especially the organizing chair Teresa Giacomini. And immense gratitude to the talk selection team without whom we wouldn’t have this amazing roster of talks.
We hope you get a lot of value out of POSETTE: An Event for Postgres 2024. Happy learning!
Footnotes
Microsoft Tech Community – Latest Blogs –Read More
how to use an integral function inside a for loop? i need to find the value of function that chages as i chages .then using this values i need to find another integral.
r0 =0.1
u =[1:7]’
Q =zeros(length(u),1)
E =zeros(length(Q),1)
for i =1:length(u)
Q(i,1) =0.023*(r0^(-1/4))*((u(i))^(-14/4))
f =@(Q) (Q(i)).^(0.3)
E(i,1) =integral(f,1,7)
endr0 =0.1
u =[1:7]’
Q =zeros(length(u),1)
E =zeros(length(Q),1)
for i =1:length(u)
Q(i,1) =0.023*(r0^(-1/4))*((u(i))^(-14/4))
f =@(Q) (Q(i)).^(0.3)
E(i,1) =integral(f,1,7)
end r0 =0.1
u =[1:7]’
Q =zeros(length(u),1)
E =zeros(length(Q),1)
for i =1:length(u)
Q(i,1) =0.023*(r0^(-1/4))*((u(i))^(-14/4))
f =@(Q) (Q(i)).^(0.3)
E(i,1) =integral(f,1,7)
end integral, for loop MATLAB Answers — New Questions
Error 5001 when trying to run Matlab 2021b.
…on Windows 7 "Unable to communicate with required MathWorks services"…on Windows 7 "Unable to communicate with required MathWorks services" …on Windows 7 "Unable to communicate with required MathWorks services" error, windows7 MATLAB Answers — New Questions
Output comparison of Analog vs Digital mems accelerometer
Analog vs. Digital MEMS Accelerometer Output Comparison
Hello,
We are developing a condition monitoring device and are currently testing its performance using the SPM Vib-15 as a reference, which is a well-known industrial condition monitoring device.
SPM Vib-15 Vibrameter (Analog Device) :
Link to datasheet: Here
Our Device with ST Accelerometer Sensor (IIS3DWB Digital Sensor):
Link to the datasheet: Here
IIS3DWB Configuration :
Accelerometer ODR: IIS3DWB_XL_ODR_26k7Hz
FIFO BDR: IIS3DWB_XL_BATCHED_AT_26k7Hz
Effective ODR: 26.9 kHz
Full Scale: ACCELERO_FS_16
Hardware Filter: IIS3DWB_HP_ODR_DIV_800
Issue :
We are measuring the acceleration RMS and velocity of a compressor/chiller/motor in an industrial setting during normal operation. Despite the IIS3DWB sensor providing output in all three axes, we are considering only the Y-axis, which aligns with the SPM Vib-15.
We have taken readings for acceleration peak, acceleration RMS, and speed RMS using both our device and the SPM Vib-15. However, our device’s readings are significantly different from those of the SPM Vib-15, particularly at higher vibration levels (almost double). The acceleration RMS values have been converted to G to match the units used by the vibrameter, and velocity RMS values are already in mm/s for both devices.
Problem :
Despite similar measurement conditions and proper mounting of both devices, our readings do not match the SPM Vib-15 readings. Given that both devices serve the same application, should we expect the digital sensor data from the IIS3DWB to closely align with the analog sensor output from the SPM Vib-15?
Are we making an error by comparing the outputs of an analog sensor to those of a digital sensor? What could be causing these discrepancies?
We have also attempted linear regression for calibration, but it did not resolve the issue.
Additional Information :
Images:
First from the right side is the SPM vibrameter, and last one (biggest one) is our device.
mounted in vertical direction
mounted in horizontal direction
(in this image at the center is our device)
the third device is for refference (blue one) , which has same sansor that we are using in our device.
Data brief of that device: https://www.st.com/resource/en/data_brief/steval-stwinkt1b.pdfAnalog vs. Digital MEMS Accelerometer Output Comparison
Hello,
We are developing a condition monitoring device and are currently testing its performance using the SPM Vib-15 as a reference, which is a well-known industrial condition monitoring device.
SPM Vib-15 Vibrameter (Analog Device) :
Link to datasheet: Here
Our Device with ST Accelerometer Sensor (IIS3DWB Digital Sensor):
Link to the datasheet: Here
IIS3DWB Configuration :
Accelerometer ODR: IIS3DWB_XL_ODR_26k7Hz
FIFO BDR: IIS3DWB_XL_BATCHED_AT_26k7Hz
Effective ODR: 26.9 kHz
Full Scale: ACCELERO_FS_16
Hardware Filter: IIS3DWB_HP_ODR_DIV_800
Issue :
We are measuring the acceleration RMS and velocity of a compressor/chiller/motor in an industrial setting during normal operation. Despite the IIS3DWB sensor providing output in all three axes, we are considering only the Y-axis, which aligns with the SPM Vib-15.
We have taken readings for acceleration peak, acceleration RMS, and speed RMS using both our device and the SPM Vib-15. However, our device’s readings are significantly different from those of the SPM Vib-15, particularly at higher vibration levels (almost double). The acceleration RMS values have been converted to G to match the units used by the vibrameter, and velocity RMS values are already in mm/s for both devices.
Problem :
Despite similar measurement conditions and proper mounting of both devices, our readings do not match the SPM Vib-15 readings. Given that both devices serve the same application, should we expect the digital sensor data from the IIS3DWB to closely align with the analog sensor output from the SPM Vib-15?
Are we making an error by comparing the outputs of an analog sensor to those of a digital sensor? What could be causing these discrepancies?
We have also attempted linear regression for calibration, but it did not resolve the issue.
Additional Information :
Images:
First from the right side is the SPM vibrameter, and last one (biggest one) is our device.
mounted in vertical direction
mounted in horizontal direction
(in this image at the center is our device)
the third device is for refference (blue one) , which has same sansor that we are using in our device.
Data brief of that device: https://www.st.com/resource/en/data_brief/steval-stwinkt1b.pdf Analog vs. Digital MEMS Accelerometer Output Comparison
Hello,
We are developing a condition monitoring device and are currently testing its performance using the SPM Vib-15 as a reference, which is a well-known industrial condition monitoring device.
SPM Vib-15 Vibrameter (Analog Device) :
Link to datasheet: Here
Our Device with ST Accelerometer Sensor (IIS3DWB Digital Sensor):
Link to the datasheet: Here
IIS3DWB Configuration :
Accelerometer ODR: IIS3DWB_XL_ODR_26k7Hz
FIFO BDR: IIS3DWB_XL_BATCHED_AT_26k7Hz
Effective ODR: 26.9 kHz
Full Scale: ACCELERO_FS_16
Hardware Filter: IIS3DWB_HP_ODR_DIV_800
Issue :
We are measuring the acceleration RMS and velocity of a compressor/chiller/motor in an industrial setting during normal operation. Despite the IIS3DWB sensor providing output in all three axes, we are considering only the Y-axis, which aligns with the SPM Vib-15.
We have taken readings for acceleration peak, acceleration RMS, and speed RMS using both our device and the SPM Vib-15. However, our device’s readings are significantly different from those of the SPM Vib-15, particularly at higher vibration levels (almost double). The acceleration RMS values have been converted to G to match the units used by the vibrameter, and velocity RMS values are already in mm/s for both devices.
Problem :
Despite similar measurement conditions and proper mounting of both devices, our readings do not match the SPM Vib-15 readings. Given that both devices serve the same application, should we expect the digital sensor data from the IIS3DWB to closely align with the analog sensor output from the SPM Vib-15?
Are we making an error by comparing the outputs of an analog sensor to those of a digital sensor? What could be causing these discrepancies?
We have also attempted linear regression for calibration, but it did not resolve the issue.
Additional Information :
Images:
First from the right side is the SPM vibrameter, and last one (biggest one) is our device.
mounted in vertical direction
mounted in horizontal direction
(in this image at the center is our device)
the third device is for refference (blue one) , which has same sansor that we are using in our device.
Data brief of that device: https://www.st.com/resource/en/data_brief/steval-stwinkt1b.pdf predictive_maintenance, condition_monitoring, spm_vib_15 MATLAB Answers — New Questions
Can I use quadprog solver in an Explicit MPC?
Hi,
I have a question regarding to using quadprog solver. Can I use quadprog solver to obtain all the regions for a Explicit MPC?
I have this in my code (thinking that maybe I can use quadprog solver)
% Generate explicit MPC controller
mpcobj.Optimizer.Solver = ‘interior-point’;
setCustomSolver(mpcobj,’quadprog’);
My other question is can I change the cost function that the Explicit MPC will minimize when it will obtain the controller? How?
Thanks in advance
DaveHi,
I have a question regarding to using quadprog solver. Can I use quadprog solver to obtain all the regions for a Explicit MPC?
I have this in my code (thinking that maybe I can use quadprog solver)
% Generate explicit MPC controller
mpcobj.Optimizer.Solver = ‘interior-point’;
setCustomSolver(mpcobj,’quadprog’);
My other question is can I change the cost function that the Explicit MPC will minimize when it will obtain the controller? How?
Thanks in advance
Dave Hi,
I have a question regarding to using quadprog solver. Can I use quadprog solver to obtain all the regions for a Explicit MPC?
I have this in my code (thinking that maybe I can use quadprog solver)
% Generate explicit MPC controller
mpcobj.Optimizer.Solver = ‘interior-point’;
setCustomSolver(mpcobj,’quadprog’);
My other question is can I change the cost function that the Explicit MPC will minimize when it will obtain the controller? How?
Thanks in advance
Dave mpc, explicit mpc, solve MATLAB Answers — New Questions
I am facing an issue while converting my OFDM code from matlab to HDL during fixed point conversion
This is my ofdm code , which simulates ofdm reciever and transmitter , over a rayleigh channel , using 16Qam modulation, with doppler.
function [BitsRx] = OfdmDopplerBer(~)
Rs = 54.64e5;
% Symbol Duration, [s]
Ts = 1/Rs;
% Carrier Frequency, [Hz]
f = 1.5e9;
% Modulation Order of QPSK by definition
M = 16;
% Number of Bits in QPSK Symbol
k = log2(M);
% QPSK Signal Bandwidth, [Hz]
F = 1/Ts;
% Number of Subcarriers (equal to Number of FFT points)
numSC = 1024;
%NumSymbols=3;
% Guard Bands Subcarriers
GuardBandSC = [10; 10];
% Central Null Subcarrier
DCNull = true;
DCNullSC = numSC/2 + 1;
% Number of Pilot Subcarriers
numPilotSC = 10;
PilotSC =[15 125 236 346 456 567 677 787 898 1008]’;
% Length of Cyclic Prefix
lenCP = numSC/4;
% OFDM Modulator Object
OFDMModulator = comm.OFDMModulator( …
‘FFTLength’, numSC, …
‘NumGuardBandCarriers’, GuardBandSC, …
‘Windowing’,true,…
‘InsertDCNull’, DCNull, …
‘PilotInputPort’, true, …
‘PilotCarrierIndices’, PilotSC, …
‘CyclicPrefixLength’, lenCP);
OFDMDemodulator = comm.OFDMDemodulator(OFDMModulator);
% Mapping of Subcarriers in Time-Frequency Space
%showResourceMapping(OFDMModulator)
% Number of Data Subcarriers
numDataSC = info(OFDMModulator).DataInputSize(1);
% Size of Data Frame
szDataFrame = [numDataSC 1];
% Size of Pilot Frame
szPilotFrame = info(OFDMModulator).PilotInputSize;
% OFDM Symbol Duration with Cyclic Prefix, [s]
Ts_OFDM = (numSC + lenCP)*Ts;
% OFDM Symbol Rate with Cyclic Prefix, [1/s]
Rs_OFDM = 1/Ts_OFDM;
% Decreasing of Symbol Rate by using OFDM
Rs/Rs_OFDM;
% Subcarrier Bandwidth, [Hz]
F_SC = F/numSC;
clear ans
% Discrete Paths Relative Delays, [s]
PathDelays = [0 3 5 6 11]*Ts ;
% Discrete Paths Max Delay, [s]
Tm = max(PathDelays);
% Channel Coherence Bandwidth [2, p. 960; 3, p. 399], [Hz]
Fc = 1/Tm;
% Discrete Paths Average Gains, [dB]
PathAvGains = [0 -8 -17 -21 -25];
% Discrete Paths K Factors
K = [0.1 0.1 0.1 0.1 0.1];
% Approximate Speed of Ionospheric Irregularities, [m/s]
v=170.14;
% Light Speed, [m/s]
c = 3e8;
% Max Doppler Frequency Shift for all Discrete Paths, [Hz]
fD = v*f/c;
% Channel Coherence Time [3, p. 400], [s]
Tc = 1/fD;
spsSync = 1;
norms = [1 sqrt(2) 0 sqrt(10) 0 sqrt(42)];
doppler1 = comm.PhaseFrequencyOffset( …
FrequencyOffset=fD, …
PhaseOffset=0, …
SampleRate=Rs);
varDelay = dsp.VariableFractionalDelay;
%% Rician Channel Object
RicianFadingChannel = comm.RicianChannel( …
‘SampleRate’, Rs, …
‘PathDelays’, PathDelays, …
‘AveragePathGains’, PathAvGains, …
‘NormalizePathGains’, true, …
‘KFactor’, K, …
‘MaximumDopplerShift’, fD, …
‘DirectPathDopplerShift’, zeros(size(K)), …
‘DirectPathInitialPhase’, zeros(size(K)), …
‘DopplerSpectrum’, doppler(‘Jakes’) …
);
% Delay in Channel Object, [sample]
ChanDelay = info(RicianFadingChannel).ChannelFilterDelay;
%% AWGN Channel Object
AWGNChannel = comm.AWGNChannel( …
‘NoiseMethod’, ‘Signal to noise ratio (SNR)’, …
‘SNR’, 0 …
);
% table(F, F_SC, Fc, fD, ‘VariableNames’, {‘F, [Hz]’, ‘F_SC, [Hz]’, ‘Fc, [Hz]’, ‘fD, [Hz]’})
% table(Ts, Ts_OFDM, Tm, Tc, ‘VariableNames’, {‘Ts, [s]’, ‘Ts_OFDM, [s]’, ‘Tm, [s]’, ‘Tc, [s]’})
% Range of Eb/N0
EbNo = 0:60;
% Number of Transmitted Frames
numFrames = 500;
% BER Calculators Object
BERCalculater = comm.ErrorRate;
% BER Variable for Imitation Modeling Result
BER = zeros(3,length(EbNo));
% Loop for the Range of Eb/N0
for n = 1:length(EbNo)
% Setting the Eb/No in AWGN Channel Object
AWGNChannel.SNR = EbNo(n) + 10*log10(k) + 10*log10(numDataSC/numSC);
% BER Calculation
reset(BERCalculater);
BERn = zeros(3,1);
% Loop for the Number of Transmitted Frames
for fr = 1:numFrames
% >>> Transmitter >>>
% Generation of Data Bits
BitsTx = randi([0 M-1], [szDataFrame,1]);
constellation = qammod(0:M-1, M, ‘gray’);
% Normalize the constellation
constellation = constellation / norms(k);
% Apply phase offset
% constellation = constellation * exp(1i * phaseOffset);
% Define General QAM Modulator with custom constellation
QAMModulator = comm.GeneralQAMModulator(‘Constellation’, constellation);
SignalTx1 = zeros(szDataFrame);
% Modulate the data symbols
SignalTx1 = QAMModulator(BitsTx);
% Generation of Pilot Signals
PilotSignalTx = complex(ones(szPilotFrame), zeros(szPilotFrame));
% OFDM Modulation
SignalTx2 = OFDMModulator(SignalTx1, PilotSignalTx);
% Power of Transmitted Signal
% Compute the power of the transmitted signal
SignalTxPower = sum(abs(SignalTx2).^2) / length(SignalTx2);
% Adding zero samples to the end of Transmitted Signal
% to not lose shifted samples caused by delay after Rician Channel
SignalTx2 = [SignalTx2; zeros(ChanDelay, 1)];
%SignalTx2_with_pfo = pfo(SignalTx2);
%%
% Rician Channel
SignalChan1 = RicianFadingChannel(SignalTx2);
% Removing first ChanDelay samples and
% selection of Channel’s Signal related to Transmitted Signal
SignalChan1 = SignalChan1(ChanDelay + 1 : end);
%% introducing the delay in frequency and symbol time due to doppler
txDoppler = doppler1(SignalChan1);
txDelay = varDelay(txDoppler, fr/numFrames);
SignalChan3=txDelay;
%%
% AWGN Channel
AWGNChannel.SignalPower = SignalTxPower;
SignalChan2 = AWGNChannel(SignalChan3);
% >>> Receiver >>>
% OFDM Demodulation
[SignalRx1, PilotSignalRx] = OFDMDemodulator(SignalChan2);
%%
% LS Channel Estimation
% Obtaining discrete points of Channel Frequency Response
% based on dividing the Received Pilot Signals by the known ones
ChanFR_dp = PilotSignalRx ./ PilotSignalTx;
% Interpolation of Channel Frequency Response
% ChanFR_int = zeros(numSC, 1); % Preallocate the result array
ChanFR_int = fixed.interp1( …
PilotSC, …
ChanFR_dp, …
GuardBandSC(1) + 1 : numSC – GuardBandSC(2), …
‘linear’ …
);
% Selection of Data Subcarriers components of Frequency Response
% by cutting out components of Pilot and DC Subcarriers
% Remove components of Pilot and DC Subcarriers
ChanFR_int([PilotSC; DCNullSC] – GuardBandSC(1)) = [];
% LS Solution
SignalRx2 = SignalRx1./ ChanFR_int.’;
% 2. Denormalize the signal
SignalRx2 = SignalRx2* norms(k);
QAMDemodulator = comm.GeneralQAMDemodulator(‘Constellation’,…
qammod(0:M-1, M, ‘gray’));
% Demodulate the received signal
BitsRx = QAMDemodulator(SignalRx2);
%BitsRx = qamdemod(SignalRx2*sqrt(10),M,"gray");
% BER Calculation
BERn = BERCalculater(BitsTx, BitsRx);
end
% BER Results
BER(:,n) = BERn;
end
clear n fr BERn
disp(BitsRx);
end
I am trying to convert this code to hdl, but am facing this error in the fixed point conversion part
Expected input 1 to have fixed dimensions for System object comm.OFDMModulator.
refering to this line
SignalTx2 = OFDMModulator(SignalTx1, PilotSignalTx);
Can someone help with this ?This is my ofdm code , which simulates ofdm reciever and transmitter , over a rayleigh channel , using 16Qam modulation, with doppler.
function [BitsRx] = OfdmDopplerBer(~)
Rs = 54.64e5;
% Symbol Duration, [s]
Ts = 1/Rs;
% Carrier Frequency, [Hz]
f = 1.5e9;
% Modulation Order of QPSK by definition
M = 16;
% Number of Bits in QPSK Symbol
k = log2(M);
% QPSK Signal Bandwidth, [Hz]
F = 1/Ts;
% Number of Subcarriers (equal to Number of FFT points)
numSC = 1024;
%NumSymbols=3;
% Guard Bands Subcarriers
GuardBandSC = [10; 10];
% Central Null Subcarrier
DCNull = true;
DCNullSC = numSC/2 + 1;
% Number of Pilot Subcarriers
numPilotSC = 10;
PilotSC =[15 125 236 346 456 567 677 787 898 1008]’;
% Length of Cyclic Prefix
lenCP = numSC/4;
% OFDM Modulator Object
OFDMModulator = comm.OFDMModulator( …
‘FFTLength’, numSC, …
‘NumGuardBandCarriers’, GuardBandSC, …
‘Windowing’,true,…
‘InsertDCNull’, DCNull, …
‘PilotInputPort’, true, …
‘PilotCarrierIndices’, PilotSC, …
‘CyclicPrefixLength’, lenCP);
OFDMDemodulator = comm.OFDMDemodulator(OFDMModulator);
% Mapping of Subcarriers in Time-Frequency Space
%showResourceMapping(OFDMModulator)
% Number of Data Subcarriers
numDataSC = info(OFDMModulator).DataInputSize(1);
% Size of Data Frame
szDataFrame = [numDataSC 1];
% Size of Pilot Frame
szPilotFrame = info(OFDMModulator).PilotInputSize;
% OFDM Symbol Duration with Cyclic Prefix, [s]
Ts_OFDM = (numSC + lenCP)*Ts;
% OFDM Symbol Rate with Cyclic Prefix, [1/s]
Rs_OFDM = 1/Ts_OFDM;
% Decreasing of Symbol Rate by using OFDM
Rs/Rs_OFDM;
% Subcarrier Bandwidth, [Hz]
F_SC = F/numSC;
clear ans
% Discrete Paths Relative Delays, [s]
PathDelays = [0 3 5 6 11]*Ts ;
% Discrete Paths Max Delay, [s]
Tm = max(PathDelays);
% Channel Coherence Bandwidth [2, p. 960; 3, p. 399], [Hz]
Fc = 1/Tm;
% Discrete Paths Average Gains, [dB]
PathAvGains = [0 -8 -17 -21 -25];
% Discrete Paths K Factors
K = [0.1 0.1 0.1 0.1 0.1];
% Approximate Speed of Ionospheric Irregularities, [m/s]
v=170.14;
% Light Speed, [m/s]
c = 3e8;
% Max Doppler Frequency Shift for all Discrete Paths, [Hz]
fD = v*f/c;
% Channel Coherence Time [3, p. 400], [s]
Tc = 1/fD;
spsSync = 1;
norms = [1 sqrt(2) 0 sqrt(10) 0 sqrt(42)];
doppler1 = comm.PhaseFrequencyOffset( …
FrequencyOffset=fD, …
PhaseOffset=0, …
SampleRate=Rs);
varDelay = dsp.VariableFractionalDelay;
%% Rician Channel Object
RicianFadingChannel = comm.RicianChannel( …
‘SampleRate’, Rs, …
‘PathDelays’, PathDelays, …
‘AveragePathGains’, PathAvGains, …
‘NormalizePathGains’, true, …
‘KFactor’, K, …
‘MaximumDopplerShift’, fD, …
‘DirectPathDopplerShift’, zeros(size(K)), …
‘DirectPathInitialPhase’, zeros(size(K)), …
‘DopplerSpectrum’, doppler(‘Jakes’) …
);
% Delay in Channel Object, [sample]
ChanDelay = info(RicianFadingChannel).ChannelFilterDelay;
%% AWGN Channel Object
AWGNChannel = comm.AWGNChannel( …
‘NoiseMethod’, ‘Signal to noise ratio (SNR)’, …
‘SNR’, 0 …
);
% table(F, F_SC, Fc, fD, ‘VariableNames’, {‘F, [Hz]’, ‘F_SC, [Hz]’, ‘Fc, [Hz]’, ‘fD, [Hz]’})
% table(Ts, Ts_OFDM, Tm, Tc, ‘VariableNames’, {‘Ts, [s]’, ‘Ts_OFDM, [s]’, ‘Tm, [s]’, ‘Tc, [s]’})
% Range of Eb/N0
EbNo = 0:60;
% Number of Transmitted Frames
numFrames = 500;
% BER Calculators Object
BERCalculater = comm.ErrorRate;
% BER Variable for Imitation Modeling Result
BER = zeros(3,length(EbNo));
% Loop for the Range of Eb/N0
for n = 1:length(EbNo)
% Setting the Eb/No in AWGN Channel Object
AWGNChannel.SNR = EbNo(n) + 10*log10(k) + 10*log10(numDataSC/numSC);
% BER Calculation
reset(BERCalculater);
BERn = zeros(3,1);
% Loop for the Number of Transmitted Frames
for fr = 1:numFrames
% >>> Transmitter >>>
% Generation of Data Bits
BitsTx = randi([0 M-1], [szDataFrame,1]);
constellation = qammod(0:M-1, M, ‘gray’);
% Normalize the constellation
constellation = constellation / norms(k);
% Apply phase offset
% constellation = constellation * exp(1i * phaseOffset);
% Define General QAM Modulator with custom constellation
QAMModulator = comm.GeneralQAMModulator(‘Constellation’, constellation);
SignalTx1 = zeros(szDataFrame);
% Modulate the data symbols
SignalTx1 = QAMModulator(BitsTx);
% Generation of Pilot Signals
PilotSignalTx = complex(ones(szPilotFrame), zeros(szPilotFrame));
% OFDM Modulation
SignalTx2 = OFDMModulator(SignalTx1, PilotSignalTx);
% Power of Transmitted Signal
% Compute the power of the transmitted signal
SignalTxPower = sum(abs(SignalTx2).^2) / length(SignalTx2);
% Adding zero samples to the end of Transmitted Signal
% to not lose shifted samples caused by delay after Rician Channel
SignalTx2 = [SignalTx2; zeros(ChanDelay, 1)];
%SignalTx2_with_pfo = pfo(SignalTx2);
%%
% Rician Channel
SignalChan1 = RicianFadingChannel(SignalTx2);
% Removing first ChanDelay samples and
% selection of Channel’s Signal related to Transmitted Signal
SignalChan1 = SignalChan1(ChanDelay + 1 : end);
%% introducing the delay in frequency and symbol time due to doppler
txDoppler = doppler1(SignalChan1);
txDelay = varDelay(txDoppler, fr/numFrames);
SignalChan3=txDelay;
%%
% AWGN Channel
AWGNChannel.SignalPower = SignalTxPower;
SignalChan2 = AWGNChannel(SignalChan3);
% >>> Receiver >>>
% OFDM Demodulation
[SignalRx1, PilotSignalRx] = OFDMDemodulator(SignalChan2);
%%
% LS Channel Estimation
% Obtaining discrete points of Channel Frequency Response
% based on dividing the Received Pilot Signals by the known ones
ChanFR_dp = PilotSignalRx ./ PilotSignalTx;
% Interpolation of Channel Frequency Response
% ChanFR_int = zeros(numSC, 1); % Preallocate the result array
ChanFR_int = fixed.interp1( …
PilotSC, …
ChanFR_dp, …
GuardBandSC(1) + 1 : numSC – GuardBandSC(2), …
‘linear’ …
);
% Selection of Data Subcarriers components of Frequency Response
% by cutting out components of Pilot and DC Subcarriers
% Remove components of Pilot and DC Subcarriers
ChanFR_int([PilotSC; DCNullSC] – GuardBandSC(1)) = [];
% LS Solution
SignalRx2 = SignalRx1./ ChanFR_int.’;
% 2. Denormalize the signal
SignalRx2 = SignalRx2* norms(k);
QAMDemodulator = comm.GeneralQAMDemodulator(‘Constellation’,…
qammod(0:M-1, M, ‘gray’));
% Demodulate the received signal
BitsRx = QAMDemodulator(SignalRx2);
%BitsRx = qamdemod(SignalRx2*sqrt(10),M,"gray");
% BER Calculation
BERn = BERCalculater(BitsTx, BitsRx);
end
% BER Results
BER(:,n) = BERn;
end
clear n fr BERn
disp(BitsRx);
end
I am trying to convert this code to hdl, but am facing this error in the fixed point conversion part
Expected input 1 to have fixed dimensions for System object comm.OFDMModulator.
refering to this line
SignalTx2 = OFDMModulator(SignalTx1, PilotSignalTx);
Can someone help with this ? This is my ofdm code , which simulates ofdm reciever and transmitter , over a rayleigh channel , using 16Qam modulation, with doppler.
function [BitsRx] = OfdmDopplerBer(~)
Rs = 54.64e5;
% Symbol Duration, [s]
Ts = 1/Rs;
% Carrier Frequency, [Hz]
f = 1.5e9;
% Modulation Order of QPSK by definition
M = 16;
% Number of Bits in QPSK Symbol
k = log2(M);
% QPSK Signal Bandwidth, [Hz]
F = 1/Ts;
% Number of Subcarriers (equal to Number of FFT points)
numSC = 1024;
%NumSymbols=3;
% Guard Bands Subcarriers
GuardBandSC = [10; 10];
% Central Null Subcarrier
DCNull = true;
DCNullSC = numSC/2 + 1;
% Number of Pilot Subcarriers
numPilotSC = 10;
PilotSC =[15 125 236 346 456 567 677 787 898 1008]’;
% Length of Cyclic Prefix
lenCP = numSC/4;
% OFDM Modulator Object
OFDMModulator = comm.OFDMModulator( …
‘FFTLength’, numSC, …
‘NumGuardBandCarriers’, GuardBandSC, …
‘Windowing’,true,…
‘InsertDCNull’, DCNull, …
‘PilotInputPort’, true, …
‘PilotCarrierIndices’, PilotSC, …
‘CyclicPrefixLength’, lenCP);
OFDMDemodulator = comm.OFDMDemodulator(OFDMModulator);
% Mapping of Subcarriers in Time-Frequency Space
%showResourceMapping(OFDMModulator)
% Number of Data Subcarriers
numDataSC = info(OFDMModulator).DataInputSize(1);
% Size of Data Frame
szDataFrame = [numDataSC 1];
% Size of Pilot Frame
szPilotFrame = info(OFDMModulator).PilotInputSize;
% OFDM Symbol Duration with Cyclic Prefix, [s]
Ts_OFDM = (numSC + lenCP)*Ts;
% OFDM Symbol Rate with Cyclic Prefix, [1/s]
Rs_OFDM = 1/Ts_OFDM;
% Decreasing of Symbol Rate by using OFDM
Rs/Rs_OFDM;
% Subcarrier Bandwidth, [Hz]
F_SC = F/numSC;
clear ans
% Discrete Paths Relative Delays, [s]
PathDelays = [0 3 5 6 11]*Ts ;
% Discrete Paths Max Delay, [s]
Tm = max(PathDelays);
% Channel Coherence Bandwidth [2, p. 960; 3, p. 399], [Hz]
Fc = 1/Tm;
% Discrete Paths Average Gains, [dB]
PathAvGains = [0 -8 -17 -21 -25];
% Discrete Paths K Factors
K = [0.1 0.1 0.1 0.1 0.1];
% Approximate Speed of Ionospheric Irregularities, [m/s]
v=170.14;
% Light Speed, [m/s]
c = 3e8;
% Max Doppler Frequency Shift for all Discrete Paths, [Hz]
fD = v*f/c;
% Channel Coherence Time [3, p. 400], [s]
Tc = 1/fD;
spsSync = 1;
norms = [1 sqrt(2) 0 sqrt(10) 0 sqrt(42)];
doppler1 = comm.PhaseFrequencyOffset( …
FrequencyOffset=fD, …
PhaseOffset=0, …
SampleRate=Rs);
varDelay = dsp.VariableFractionalDelay;
%% Rician Channel Object
RicianFadingChannel = comm.RicianChannel( …
‘SampleRate’, Rs, …
‘PathDelays’, PathDelays, …
‘AveragePathGains’, PathAvGains, …
‘NormalizePathGains’, true, …
‘KFactor’, K, …
‘MaximumDopplerShift’, fD, …
‘DirectPathDopplerShift’, zeros(size(K)), …
‘DirectPathInitialPhase’, zeros(size(K)), …
‘DopplerSpectrum’, doppler(‘Jakes’) …
);
% Delay in Channel Object, [sample]
ChanDelay = info(RicianFadingChannel).ChannelFilterDelay;
%% AWGN Channel Object
AWGNChannel = comm.AWGNChannel( …
‘NoiseMethod’, ‘Signal to noise ratio (SNR)’, …
‘SNR’, 0 …
);
% table(F, F_SC, Fc, fD, ‘VariableNames’, {‘F, [Hz]’, ‘F_SC, [Hz]’, ‘Fc, [Hz]’, ‘fD, [Hz]’})
% table(Ts, Ts_OFDM, Tm, Tc, ‘VariableNames’, {‘Ts, [s]’, ‘Ts_OFDM, [s]’, ‘Tm, [s]’, ‘Tc, [s]’})
% Range of Eb/N0
EbNo = 0:60;
% Number of Transmitted Frames
numFrames = 500;
% BER Calculators Object
BERCalculater = comm.ErrorRate;
% BER Variable for Imitation Modeling Result
BER = zeros(3,length(EbNo));
% Loop for the Range of Eb/N0
for n = 1:length(EbNo)
% Setting the Eb/No in AWGN Channel Object
AWGNChannel.SNR = EbNo(n) + 10*log10(k) + 10*log10(numDataSC/numSC);
% BER Calculation
reset(BERCalculater);
BERn = zeros(3,1);
% Loop for the Number of Transmitted Frames
for fr = 1:numFrames
% >>> Transmitter >>>
% Generation of Data Bits
BitsTx = randi([0 M-1], [szDataFrame,1]);
constellation = qammod(0:M-1, M, ‘gray’);
% Normalize the constellation
constellation = constellation / norms(k);
% Apply phase offset
% constellation = constellation * exp(1i * phaseOffset);
% Define General QAM Modulator with custom constellation
QAMModulator = comm.GeneralQAMModulator(‘Constellation’, constellation);
SignalTx1 = zeros(szDataFrame);
% Modulate the data symbols
SignalTx1 = QAMModulator(BitsTx);
% Generation of Pilot Signals
PilotSignalTx = complex(ones(szPilotFrame), zeros(szPilotFrame));
% OFDM Modulation
SignalTx2 = OFDMModulator(SignalTx1, PilotSignalTx);
% Power of Transmitted Signal
% Compute the power of the transmitted signal
SignalTxPower = sum(abs(SignalTx2).^2) / length(SignalTx2);
% Adding zero samples to the end of Transmitted Signal
% to not lose shifted samples caused by delay after Rician Channel
SignalTx2 = [SignalTx2; zeros(ChanDelay, 1)];
%SignalTx2_with_pfo = pfo(SignalTx2);
%%
% Rician Channel
SignalChan1 = RicianFadingChannel(SignalTx2);
% Removing first ChanDelay samples and
% selection of Channel’s Signal related to Transmitted Signal
SignalChan1 = SignalChan1(ChanDelay + 1 : end);
%% introducing the delay in frequency and symbol time due to doppler
txDoppler = doppler1(SignalChan1);
txDelay = varDelay(txDoppler, fr/numFrames);
SignalChan3=txDelay;
%%
% AWGN Channel
AWGNChannel.SignalPower = SignalTxPower;
SignalChan2 = AWGNChannel(SignalChan3);
% >>> Receiver >>>
% OFDM Demodulation
[SignalRx1, PilotSignalRx] = OFDMDemodulator(SignalChan2);
%%
% LS Channel Estimation
% Obtaining discrete points of Channel Frequency Response
% based on dividing the Received Pilot Signals by the known ones
ChanFR_dp = PilotSignalRx ./ PilotSignalTx;
% Interpolation of Channel Frequency Response
% ChanFR_int = zeros(numSC, 1); % Preallocate the result array
ChanFR_int = fixed.interp1( …
PilotSC, …
ChanFR_dp, …
GuardBandSC(1) + 1 : numSC – GuardBandSC(2), …
‘linear’ …
);
% Selection of Data Subcarriers components of Frequency Response
% by cutting out components of Pilot and DC Subcarriers
% Remove components of Pilot and DC Subcarriers
ChanFR_int([PilotSC; DCNullSC] – GuardBandSC(1)) = [];
% LS Solution
SignalRx2 = SignalRx1./ ChanFR_int.’;
% 2. Denormalize the signal
SignalRx2 = SignalRx2* norms(k);
QAMDemodulator = comm.GeneralQAMDemodulator(‘Constellation’,…
qammod(0:M-1, M, ‘gray’));
% Demodulate the received signal
BitsRx = QAMDemodulator(SignalRx2);
%BitsRx = qamdemod(SignalRx2*sqrt(10),M,"gray");
% BER Calculation
BERn = BERCalculater(BitsTx, BitsRx);
end
% BER Results
BER(:,n) = BERn;
end
clear n fr BERn
disp(BitsRx);
end
I am trying to convert this code to hdl, but am facing this error in the fixed point conversion part
Expected input 1 to have fixed dimensions for System object comm.OFDMModulator.
refering to this line
SignalTx2 = OFDMModulator(SignalTx1, PilotSignalTx);
Can someone help with this ? ofdm, doppler, rayleigh channel MATLAB Answers — New Questions
JSON formatting List Help?
Hi Guys
I’m new to JSON and I’m trying to make all the font size in each of the column bigger
I tried this
Hi Guys I’m new to JSON and I’m trying to make all the font size in each of the column bigger I tried this {“$schema”: “https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json”,”additionalRowClass”: “=if(@rowIndex % 2 == 0,’ms-bgColor-communicationTint20 ms-bgColor-communicationTint20–hover’,”)”,”style”: {“font-size”: “20px”}} While it changes the color of the alternating columns to light blue the font sizes doesn’t increase or decrease.Am I doing something wrong? Read More
Everything being re-labelled as d.docs.drive and not saving on OneDrive
I dont know what/how it happened, but one day, all my files stopped automatically saving to my OneDrive.
Now, every single file, as soon as I open it, will be re-labelled as d.docs.live.net and then eventually a number in brackets ie (56).
Even if I resave the file as a copy, it keeps happening.
I have tried every fix I can find online. I have cleared my credential manager, unlinked and uninstalled OneDrive and then reinstalled and relinked everything, I have chosen somewhere else on my PC for my OneDrive files to save (so now I have 2 copies of everything on my PC).
I’m at my wits end with this. Its so frustrating every single time I try and do any work, this is a problem.
Is there anything else I can do to fix this issue or somewhere I can go for help?
I dont know what/how it happened, but one day, all my files stopped automatically saving to my OneDrive. Now, every single file, as soon as I open it, will be re-labelled as d.docs.live.net and then eventually a number in brackets ie (56). Even if I resave the file as a copy, it keeps happening. I have tried every fix I can find online. I have cleared my credential manager, unlinked and uninstalled OneDrive and then reinstalled and relinked everything, I have chosen somewhere else on my PC for my OneDrive files to save (so now I have 2 copies of everything on my PC). I’m at my wits end with this. Its so frustrating every single time I try and do any work, this is a problem. Is there anything else I can do to fix this issue or somewhere I can go for help? Read More
Edge extensions — chrome.identity API is not a good UX
I am developing an Edge extension that connects to a Google account. So far, I’ve managed to connect using `chrome.identity.launchWebAuthFlow()`, but the user experience is not good — I am forced to reconnect every hour to retrieve a new access token. In Chrome this is not a problem because it supports `chrome.identity.getAuthToken()`, which handles token refresh automatically.
Is there a solution where the user doesn’t have to reconnect their Google account every hour?
I am developing an Edge extension that connects to a Google account. So far, I’ve managed to connect using `chrome.identity.launchWebAuthFlow()`, but the user experience is not good — I am forced to reconnect every hour to retrieve a new access token. In Chrome this is not a problem because it supports `chrome.identity.getAuthToken()`, which handles token refresh automatically. Is there a solution where the user doesn’t have to reconnect their Google account every hour? Read More
Why can’t the mobile client see the messages sent to the channel via Webhooks ?
Send a message to the channel with the following command
curl $url -H “Content-Type: application/json” -d ‘{“text”: “test 1”}’
It looks like there is a message on the pc side
But can’t see the message sent in the mobile client, only an empty card
The client message is as follows
Send a message to the channel with the following commandcurl $url -H “Content-Type: application/json” -d ‘{“text”: “test 1”}’It looks like there is a message on the pc side But can’t see the message sent in the mobile client, only an empty card The client message is as follows Read More